本文整理汇总了Java中org.pentaho.di.laf.BasePropertyHandler类的典型用法代码示例。如果您正苦于以下问题:Java BasePropertyHandler类的具体用法?Java BasePropertyHandler怎么用?Java BasePropertyHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BasePropertyHandler类属于org.pentaho.di.laf包,在下文中一共展示了BasePropertyHandler类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: save
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
public boolean save(EngineMetaInterface meta, String fname, boolean export) {
boolean saved = false;
FileListener listener = null;
// match by extension first
int idx = fname.lastIndexOf('.');
if (idx != -1) {
String extension = fname.substring(idx + 1);
listener = fileExtensionMap.get(extension);
}
if (listener == null) {
String xt = meta.getDefaultExtension();
listener = fileExtensionMap.get(xt);
}
if (listener != null) {
String sync = BasePropertyHandler.getProperty(SYNC_TRANS);
if (Boolean.parseBoolean(sync)) {
listener.syncMetaName(meta, Const.createName(fname));
delegates.tabs.renameTabs();
}
saved = listener.save(meta, fname, export);
}
return saved;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:26,代码来源:Spoon.java
示例2: doGet
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
@Override
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
resp.setContentType("image/png");
String id = req.getParameter("name");
OutputStream outputStream = resp.getOutputStream();
final InputStream image;
if (JobMeta.STRING_SPECIAL_START.equals(id)) {
image = getResource(BasePropertyHandler.getProperty("STR_image"));
} else if (JobMeta.STRING_SPECIAL_DUMMY.equals(id)) {
image = getResource(BasePropertyHandler.getProperty("DUM_image"));
} else {
PluginInterface pluginInterface = images.get(id);
if (pluginInterface == null) {
for (PluginInterface pluginInterface1 : registry.getPlugins(JobEntryPluginType.class)) {
if (pluginInterface1.getIds()[0].equalsIgnoreCase(id)) {
pluginInterface = pluginInterface1;
}
}
}
try {
image = getImage(pluginInterface);
} catch (KettlePluginException e) {
throw new ServletException(e);
}
}
IOUtils.copy(image, outputStream);
outputStream.flush();
}
开发者ID:brosander,项目名称:kettle-plugins,代码行数:29,代码来源:KThinJobEntryImageServlet.java
示例3: getButtonAlignment
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
/**
* Returns the default alignment for the buttons. This is set in the LAF properties with the key
* <code>Button_Position</code>. The valid values are: <UL> <LI><code>left</code> <LI><code>center</code>
* <LI><code>right</code> </UL> NOTE: if the alignment is not provided or contains an invalid value,
* <code>center</code> will be used as a default
*
* @return a constant which indicates the button alignment
*/
protected static int getButtonAlignment() {
String buttonAlign = BasePropertyHandler.getProperty( "Button_Position", "center" ).toLowerCase();
if ( "center".equals( buttonAlign ) ) {
return BUTTON_ALIGNMENT_CENTER;
} else if ( "left".equals( buttonAlign ) ) {
return BUTTON_ALIGNMENT_LEFT;
} else {
return BUTTON_ALIGNMENT_RIGHT;
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:BaseStepDialog.java
示例4: Splash
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
public Splash(Display display) throws KettleException
{
Rectangle displayBounds = display.getPrimaryMonitor().getBounds();
final Image kettle_image = ImageUtil.getImageAsResource(display, BasePropertyHandler.getProperty("splash_image")); // "kettle_splash.png"
final Image kettle_icon = ImageUtil.getImageAsResource(display, BasePropertyHandler.getProperty("splash_icon")); // "spoon.ico");
splash = new Shell(display, SWT.NONE /*SWT.ON_TOP*/);
splash.setImage(kettle_icon);
//TODO: move to BaseMessage to track i18n
splash.setText(BasePropertyHandler.getProperty("splash_text")); // "Pentaho Data Integration"
FormLayout splashLayout = new FormLayout();
splash.setLayout(splashLayout);
Canvas canvas = new Canvas(splash, SWT.NO_BACKGROUND);
FormData fdCanvas = new FormData();
fdCanvas.left = new FormAttachment(0,0);
fdCanvas.top = new FormAttachment(0,0);
fdCanvas.right = new FormAttachment(100,0);
fdCanvas.bottom = new FormAttachment(100,0);
canvas.setLayoutData(fdCanvas);
canvas.addPaintListener(new PaintListener()
{
public void paintControl(PaintEvent e)
{
e.gc.drawImage(kettle_image, 0, 0);
}
}
);
splash.addDisposeListener(new DisposeListener()
{
public void widgetDisposed(DisposeEvent arg0)
{
kettle_image.dispose();
}
}
);
Rectangle bounds = kettle_image.getBounds();
int x = (displayBounds.width - bounds.width)/2;
int y = (displayBounds.height - bounds.height)/2;
splash.setSize(bounds.width, bounds.height);
splash.setLocation(x,y);
splash.open();
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:51,代码来源:Splash.java
示例5: setDefault
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
public void setDefault()
{
FontData fd;
RGB col;
lastUsedFiles = new ArrayList<LastUsedFile>();
openTabFiles = new ArrayList<LastUsedFile>();
screens = new Hashtable<String,WindowProperty>();
properties.setProperty(STRING_LOG_LEVEL, getLogLevel());
properties.setProperty(STRING_LOG_FILTER, getLogFilter());
if (display!=null)
{
fd=getFixedFont();
properties.setProperty(STRING_FONT_FIXED_NAME, fd.getName() );
properties.setProperty(STRING_FONT_FIXED_SIZE, ""+fd.getHeight() );
properties.setProperty(STRING_FONT_FIXED_STYLE, ""+fd.getStyle() );
fd=getDefaultFont();
properties.setProperty(STRING_FONT_DEFAULT_NAME, fd.getName());
properties.setProperty(STRING_FONT_DEFAULT_SIZE, ""+fd.getHeight() );
properties.setProperty(STRING_FONT_DEFAULT_STYLE, ""+fd.getStyle() );
fd=getDefaultFont();
properties.setProperty(STRING_FONT_GRAPH_NAME, fd.getName() );
properties.setProperty(STRING_FONT_GRAPH_SIZE, ""+fd.getHeight() );
properties.setProperty(STRING_FONT_GRAPH_STYLE, ""+fd.getStyle() );
fd=getDefaultFont();
properties.setProperty(STRING_FONT_GRID_NAME, fd.getName() );
properties.setProperty(STRING_FONT_GRID_SIZE, ""+fd.getHeight() );
properties.setProperty(STRING_FONT_GRID_STYLE, ""+fd.getStyle() );
fd=getDefaultFont();
properties.setProperty(STRING_FONT_NOTE_NAME, fd.getName() );
properties.setProperty(STRING_FONT_NOTE_SIZE, ""+fd.getHeight() );
properties.setProperty(STRING_FONT_NOTE_STYLE, ""+fd.getStyle() );
col=getBackgroundRGB();
properties.setProperty(STRING_BACKGROUND_COLOR_R, ""+col.red );
properties.setProperty(STRING_BACKGROUND_COLOR_G, ""+col.green);
properties.setProperty(STRING_BACKGROUND_COLOR_B, ""+col.blue );
col=getGraphColorRGB();
properties.setProperty(STRING_GRAPH_COLOR_R, ""+col.red );
properties.setProperty(STRING_GRAPH_COLOR_G, ""+col.green );
properties.setProperty(STRING_GRAPH_COLOR_B, ""+col.blue );
properties.setProperty(STRING_ICON_SIZE, ""+getIconSize());
properties.setProperty(STRING_LINE_WIDTH, ""+getLineWidth());
properties.setProperty(STRING_SHADOW_SIZE, ""+getShadowSize());
properties.setProperty(STRING_MAX_UNDO, ""+getMaxUndo());
setSashWeights(getSashWeights());
// Set Default Look for all dialogs and sizes.
String prop = BasePropertyHandler.getProperty("Default_UI_Properties_Resource", "org.pentaho.di.ui.core.default"); //$NON-NLS-1$ //$NON-NLS-2$
try {
ResourceBundle bundle = ResourceBundle.getBundle(prop);
// ResourceBundle bundle = ResourceBundle.getBundle(prop);
if (bundle != null) {
Enumeration<String> enumer = bundle.getKeys();
String theKey;
while (enumer.hasMoreElements()) {
theKey = enumer.nextElement();
properties.setProperty(theKey, bundle.getString(theKey));
}
}
} catch (Exception ex) {
// don't throw an exception, but log it.
ex.printStackTrace();
}
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:77,代码来源:PropsUI.java
示例6: getKettleDirectory
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
/**
* Determines the Kettle directory in the user's home directory.
* @return The Kettle directory.
*/
public static final String getKettleDirectory()
{
return USER_HOME_DIRECTORY + FILE_SEPARATOR + BasePropertyHandler.getProperty("userBaseDir", ".kettle");
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:9,代码来源:Const.java
示例7: reinit
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
protected void reinit() {
replaceWith = BasePropertyHandler.getProperty("LAFpackage");
replaceSysBundle = replacePackage(SYSTEM_BUNDLE_PACKAGE);
offset = -1;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:6,代码来源:LAFMessageHandler.java
示例8: save
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
public boolean save(EngineMetaInterface meta, String fname, boolean export) {
boolean saved = false;
// the only file types that are subject to ascii-only rule are those that are not trans and not job
boolean isNotTransOrJob = !LastUsedFile.FILE_TYPE_TRANSFORMATION.equals(meta.getFileType())
&& !LastUsedFile.FILE_TYPE_JOB.equals(meta.getFileType());
if (isNotTransOrJob) {
Pattern pattern = Pattern.compile("\\p{ASCII}+");
Matcher matcher = pattern.matcher(fname);
if (!matcher.matches()) {
/*
* Temporary fix for AGILEBI-405 Don't allow saving of files that contain special characters until AGILEBI-394 is resolved.
* AGILEBI-394 Naming an analyzer report with spanish accents gives error when publishing.
* */
MessageBox box = new MessageBox(staticSpoon.shell, SWT.ICON_ERROR | SWT.OK);
box.setMessage("Special characters are not allowed in the filename. Please use ASCII characters only");
box.setText(BaseMessages.getString(PKG, "Spoon.Dialog.ErrorSavingConnection.Title"));
box.open();
return false;
}
}
FileListener listener = null;
// match by extension first
int idx = fname.lastIndexOf('.');
if (idx != -1) {
String extension = fname.substring(idx + 1);
listener = fileExtensionMap.get(extension);
}
if (listener == null) {
String xt = meta.getDefaultExtension();
listener = fileExtensionMap.get(xt);
}
if (listener != null) {
String sync = BasePropertyHandler.getProperty(SYNC_TRANS);
if (Boolean.parseBoolean(sync)) {
listener.syncMetaName(meta, Const.createName(fname));
delegates.tabs.renameTabs();
}
saved = listener.save(meta, fname, export);
}
return saved;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:47,代码来源:Spoon.java
示例9: getKettleDirectory
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
/**
* Determines the Kettle directory in the user's home directory.
* @return The Kettle directory.
*/
public static final String getKettleDirectory()
{
return getUserHomeDirectory() + FILE_SEPARATOR + BasePropertyHandler.getProperty("userBaseDir", ".kettle");
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:9,代码来源:Const.java
示例10: init
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
private void init() throws KettleException {
this.lineStyle = ELineStyle.SOLID;
this.lineWidth = 1;
this.alpha = 255;
this.background = new Color(255, 255, 255);
this.black = new Color(0, 0, 0);
this.red = new Color(255, 0, 0);
this.yellow = new Color(255, 255, 0);
this.orange = new Color(255, 165, 0);
this.green = new Color(0, 255, 0);
this.blue = new Color(0, 0, 255);
this.magenta = new Color(255, 0, 255);
this.gray = new Color(128, 128, 128);
this.lightGray = new Color(200, 200, 200);
this.darkGray = new Color(80, 80, 80);
imageLocked = getImageIcon(BasePropertyHandler.getProperty("Locked_image"));
imageStepError = getImageIcon(BasePropertyHandler.getProperty("StepErrorLines_image"));
imageEdit = getImageIcon(BasePropertyHandler.getProperty("Edit_image"));
imageContextMenu = getImageIcon(BasePropertyHandler.getProperty("ContextMenu_image"));
imageTrue = getImageIcon(BasePropertyHandler.getProperty("True_image"));
imageFalse = getImageIcon(BasePropertyHandler.getProperty("False_image"));
imageErrorHop = getImageIcon(BasePropertyHandler.getProperty("ErrorHop_image"));
imageInfoHop = getImageIcon(BasePropertyHandler.getProperty("InfoHop_image"));
imageHopTarget = getImageIcon(BasePropertyHandler.getProperty("HopTarget_image"));
imageHopInput = getImageIcon(BasePropertyHandler.getProperty("HopInput_image"));
imageHopOutput = getImageIcon(BasePropertyHandler.getProperty("HopOutput_image"));
imageArrow = getImageIcon(BasePropertyHandler.getProperty("ArrowIcon_image"));
imageCopyHop = getImageIcon(BasePropertyHandler.getProperty("CopyHop_image"));
imageParallelHop = getImageIcon(BasePropertyHandler.getProperty("ParallelHop_image"));
imageUnconditionalHop = getImageIcon(BasePropertyHandler.getProperty("UnconditionalHop_image"));
imageStart = getImageIcon(BasePropertyHandler.getProperty("STR_image"));
imageDummy = getImageIcon(BasePropertyHandler.getProperty("DUM_image"));
imageBusy = getImageIcon(BasePropertyHandler.getProperty("Busy_image"));
fontGraph = new Font("FreeSans", Font.PLAIN, 10);
fontNote = new Font("FreeSans", Font.PLAIN, 10);
fontSmall = new Font("FreeSans", Font.PLAIN, 8);
gc.setFont(fontGraph);
gc.setColor(background);
gc.fillRect(0, 0, area.x, area.y);
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:46,代码来源:SwingGC.java
示例11: init
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
private void init() throws KettleException {
this.lineStyle = ELineStyle.SOLID;
this.lineWidth = 1;
this.alpha = 255;
this.background = new Color(255, 255, 255);
this.black = new Color(0, 0, 0);
this.red = new Color(255, 0, 0);
this.yellow = new Color(255, 255, 0);
this.orange = new Color(255, 165, 0);
this.green = new Color(0, 255, 0);
this.blue = new Color(0, 0, 255);
this.magenta = new Color(255, 0, 255);
this.gray = new Color(128, 128, 128);
this.lightGray = new Color(200, 200, 200);
this.darkGray = new Color(80, 80, 80);
imageLocked = getImageIcon(BasePropertyHandler.getProperty("Locked_image"));
imageStepError = getImageIcon(BasePropertyHandler.getProperty("StepErrorLines_image"));
imageEdit = getImageIcon(BasePropertyHandler.getProperty("Edit_image"));
imageContextMenu = getImageIcon(BasePropertyHandler.getProperty("ContextMenu_image"));
imageTrue = getImageIcon(BasePropertyHandler.getProperty("True_image"));
imageFalse = getImageIcon(BasePropertyHandler.getProperty("False_image"));
imageErrorHop = getImageIcon(BasePropertyHandler.getProperty("ErrorHop_image"));
imageInfoHop = getImageIcon(BasePropertyHandler.getProperty("InfoHop_image"));
imageHopTarget = getImageIcon(BasePropertyHandler.getProperty("HopTarget_image"));
imageHopInput = getImageIcon(BasePropertyHandler.getProperty("HopInput_image"));
imageHopOutput = getImageIcon(BasePropertyHandler.getProperty("HopOutput_image"));
imageArrow = getImageIcon(BasePropertyHandler.getProperty("ArrowIcon_image"));
imageCopyHop = getImageIcon(BasePropertyHandler.getProperty("CopyHop_image"));
imageLoadBalance = getImageIcon(BasePropertyHandler.getProperty("LoadBalance_image"));
imageCheckpoint = getImageIcon(BasePropertyHandler.getProperty("CheckeredFlag_image"));
imageDatabase = getImageIcon(BasePropertyHandler.getProperty("Database_image"));
imageParallelHop = getImageIcon(BasePropertyHandler.getProperty("ParallelHop_image"));
imageUnconditionalHop = getImageIcon(BasePropertyHandler.getProperty("UnconditionalHop_image"));
imageStart = getImageIcon(BasePropertyHandler.getProperty("STR_image"));
imageDummy = getImageIcon(BasePropertyHandler.getProperty("DUM_image"));
imageBusy = getImageIcon(BasePropertyHandler.getProperty("Busy_image"));
imageInject = getImageIcon(BasePropertyHandler.getProperty("Inject_image"));
fontGraph = new Font("FreeSans", Font.PLAIN, 10);
fontNote = new Font("FreeSans", Font.PLAIN, 10);
fontSmall = new Font("FreeSans", Font.PLAIN, 8);
gc.setFont(fontGraph);
gc.setColor(background);
gc.fillRect(0, 0, area.x, area.y);
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:50,代码来源:SwingDirectGC.java
示例12: init
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
private void init() throws KettleException {
this.lineStyle = ELineStyle.SOLID;
this.lineWidth = 1;
this.alpha = 255;
this.background = new Color(255, 255, 255);
this.black = new Color(0, 0, 0);
this.red = new Color(255, 0, 0);
this.yellow = new Color(255, 255, 0);
this.orange = new Color(255, 165, 0);
this.green = new Color(0, 255, 0);
this.blue = new Color(0, 0, 255);
this.magenta = new Color(255, 0, 255);
this.gray = new Color(128, 128, 128);
this.lightGray = new Color(200, 200, 200);
this.darkGray = new Color(80, 80, 80);
imageLocked = getImageIcon(BasePropertyHandler.getProperty("Locked_image"));
imageStepError = getImageIcon(BasePropertyHandler.getProperty("StepErrorLines_image"));
imageEdit = getImageIcon(BasePropertyHandler.getProperty("Edit_image"));
imageContextMenu = getImageIcon(BasePropertyHandler.getProperty("ContextMenu_image"));
imageTrue = getImageIcon(BasePropertyHandler.getProperty("True_image"));
imageFalse = getImageIcon(BasePropertyHandler.getProperty("False_image"));
imageErrorHop = getImageIcon(BasePropertyHandler.getProperty("ErrorHop_image"));
imageInfoHop = getImageIcon(BasePropertyHandler.getProperty("InfoHop_image"));
imageHopTarget = getImageIcon(BasePropertyHandler.getProperty("HopTarget_image"));
imageHopInput = getImageIcon(BasePropertyHandler.getProperty("HopInput_image"));
imageHopOutput = getImageIcon(BasePropertyHandler.getProperty("HopOutput_image"));
imageArrow = getImageIcon(BasePropertyHandler.getProperty("ArrowIcon_image"));
imageCopyHop = getImageIcon(BasePropertyHandler.getProperty("CopyHop_image"));
imageLoadBalance = getImageIcon(BasePropertyHandler.getProperty("LoadBalance_image"));
imageCheckpoint = getImageIcon(BasePropertyHandler.getProperty("CheckeredFlag_image"));
imageDatabase = getImageIcon(BasePropertyHandler.getProperty("Database_image"));
imageParallelHop = getImageIcon(BasePropertyHandler.getProperty("ParallelHop_image"));
imageUnconditionalHop = getImageIcon(BasePropertyHandler.getProperty("UnconditionalHop_image"));
imageStart = getImageIcon(BasePropertyHandler.getProperty("STR_image"));
imageDummy = getImageIcon(BasePropertyHandler.getProperty("DUM_image"));
imageBusy = getImageIcon(BasePropertyHandler.getProperty("Busy_image"));
imageInject = getImageIcon(BasePropertyHandler.getProperty("Inject_image"));
fontGraph = new Font("FreeSans", Font.PLAIN, 10);
fontNote = new Font("FreeSans", Font.PLAIN, 10);
fontSmall = new Font("FreeSans", Font.PLAIN, 8);
gc.setFont(fontGraph);
gc.setColor(background);
gc.fillRect(0, 0, area.x, area.y);
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:50,代码来源:SwingGC.java
示例13: save
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
public boolean save(EngineMetaInterface meta, String fname, boolean export) {
boolean saved = false;
// the only file types that are subject to ascii-only rule are those that are not trans and not job
boolean isNotTransOrJob = !LastUsedFile.FILE_TYPE_TRANSFORMATION.equals(meta.getFileType())
&& !LastUsedFile.FILE_TYPE_JOB.equals(meta.getFileType());
if (isNotTransOrJob) {
Pattern pattern = Pattern.compile("\\p{ASCII}+");
Matcher matcher = pattern.matcher(fname);
if (!matcher.matches()) {
/*
* Temporary fix for AGILEBI-405 Don't allow saving of files that contain special characters until AGILEBI-394 is resolved.
* AGILEBI-394 Naming an analyzer report with spanish accents gives error when publishing.
* */
MessageBox box = new MessageBox(staticSpoon.shell, SWT.ICON_ERROR | SWT.OK);
box.setMessage("Special characters are not allowed in the filename. Please use ASCII characters only");
box.setText(BaseMessages.getString(PKG, "Spoon.Dialog.ErrorSavingConnection.Title"));
box.open();
return false;
}
}
FileListener listener = null;
// match by extension first
int idx = fname.lastIndexOf('.');
if (idx != -1) {
String extension = fname.substring(idx + 1);
listener = fileExtensionMap.get(extension);
}
if (listener == null) {
String xt = meta.getDefaultExtension();
listener = fileExtensionMap.get(xt);
}
if (listener != null) {
String sync = BasePropertyHandler.getProperty(SYNC_TRANS);
if (Boolean.parseBoolean(sync)) {
listener.syncMetaName(meta, Const.createName(fname));
delegates.tabs.renameTabs();
}
saved = listener.save(meta, fname, export);
}
return saved;
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:47,代码来源:Spoon.java
示例14: init
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
private void init() throws KettleException {
this.lineStyle = ELineStyle.SOLID;
this.lineWidth = 1;
this.alpha = 255;
this.background = new Color( 255, 255, 255 );
this.black = new Color( 0, 0, 0 );
this.red = new Color( 255, 0, 0 );
this.yellow = new Color( 255, 255, 0 );
this.orange = new Color( 255, 165, 0 );
this.green = new Color( 0, 255, 0 );
this.blue = new Color( 0, 0, 255 );
this.magenta = new Color( 255, 0, 255 );
this.gray = new Color( 128, 128, 128 );
this.lightGray = new Color( 200, 200, 200 );
this.darkGray = new Color( 80, 80, 80 );
this.lightBlue = new Color( 135, 206, 250 ); // light sky blue
this.crystal = new Color( 61, 99, 128 );
this.hopDefault = new Color( 61, 99, 128 );
this.hopOK = new Color( 12, 178, 15 );
imageLocked = getImageIcon( BasePropertyHandler.getProperty( "Locked_image" ) );
imageStepError = getImageIcon( BasePropertyHandler.getProperty( "StepErrorLines_image" ) );
imageEdit = getImageIcon( BasePropertyHandler.getProperty( "EditSmall_image" ) );
imageContextMenu = getImageIcon( BasePropertyHandler.getProperty( "ContextMenu_image" ) );
imageTrue = getImageIcon( BasePropertyHandler.getProperty( "True_image" ) );
imageFalse = getImageIcon( BasePropertyHandler.getProperty( "False_image" ) );
imageErrorHop = getImageIcon( BasePropertyHandler.getProperty( "ErrorHop_image" ) );
imageInfoHop = getImageIcon( BasePropertyHandler.getProperty( "InfoHop_image" ) );
imageHopTarget = getImageIcon( BasePropertyHandler.getProperty( "HopTarget_image" ) );
imageHopInput = getImageIcon( BasePropertyHandler.getProperty( "HopInput_image" ) );
imageHopOutput = getImageIcon( BasePropertyHandler.getProperty( "HopOutput_image" ) );
imageArrow = getImageIcon( BasePropertyHandler.getProperty( "ArrowIcon_image" ) );
imageCopyHop = getImageIcon( BasePropertyHandler.getProperty( "CopyHop_image" ) );
imageLoadBalance = getImageIcon( BasePropertyHandler.getProperty( "LoadBalance_image" ) );
imageCheckpoint = getImageIcon( BasePropertyHandler.getProperty( "CheckeredFlag_image" ) );
imageDatabase = getImageIcon( BasePropertyHandler.getProperty( "Database_image" ) );
imageParallelHop = getImageIcon( BasePropertyHandler.getProperty( "ParallelHop_image" ) );
imageUnconditionalHop = getImageIcon( BasePropertyHandler.getProperty( "UnconditionalHop_image" ) );
imageStart = getImageIcon( BasePropertyHandler.getProperty( "STR_image" ) );
imageDummy = getImageIcon( BasePropertyHandler.getProperty( "DUM_image" ) );
imageBusy = getImageIcon( BasePropertyHandler.getProperty( "Busy_image" ) );
imageInject = getImageIcon( BasePropertyHandler.getProperty( "Inject_image" ) );
defaultArrow = getImageIcon( BasePropertyHandler.getProperty( "defaultArrow_image" ) );
okArrow = getImageIcon( BasePropertyHandler.getProperty( "okArrow_image" ) );
errorArrow = getImageIcon( BasePropertyHandler.getProperty( "errorArrow_image" ) );
disabledArrow = getImageIcon( BasePropertyHandler.getProperty( "disabledArrow_image" ) );
fontGraph = new Font( "FreeSans", Font.PLAIN, 10 );
fontNote = new Font( "FreeSans", Font.PLAIN, 10 );
fontSmall = new Font( "FreeSans", Font.PLAIN, 8 );
gc.setFont( fontGraph );
gc.setColor( background );
gc.fillRect( 0, 0, area.x, area.y );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:59,代码来源:SwingDirectGC.java
示例15: save
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
public boolean save( EngineMetaInterface meta, String filename, boolean export ) {
boolean saved = false;
// the only file types that are subject to ascii-only rule are those that are not trans and not job
boolean isNotTransOrJob =
!LastUsedFile.FILE_TYPE_TRANSFORMATION.equals( meta.getFileType() )
&& !LastUsedFile.FILE_TYPE_JOB.equals( meta.getFileType() );
if ( isNotTransOrJob ) {
Pattern pattern = Pattern.compile( "\\p{ASCII}+" );
Matcher matcher = pattern.matcher( filename );
if ( !matcher.matches() ) {
/*
* Temporary fix for AGILEBI-405 Don't allow saving of files that contain special characters until AGILEBI-394
* is resolved. AGILEBI-394 Naming an analyzer report with spanish accents gives error when publishing.
*/
MessageBox box = new MessageBox( staticSpoon.shell, SWT.ICON_ERROR | SWT.OK );
box.setMessage( "Special characters are not allowed in the filename. Please use ASCII characters only" );
box.setText( BaseMessages.getString( PKG, "Spoon.Dialog.ErrorSavingConnection.Title" ) );
box.open();
return false;
}
}
FileListener listener = null;
// match by extension first
int idx = filename.lastIndexOf( '.' );
if ( idx != -1 ) {
String extension = filename.substring( idx + 1 );
listener = fileExtensionMap.get( extension );
}
if ( listener == null ) {
String xt = meta.getDefaultExtension();
listener = fileExtensionMap.get( xt );
}
if ( listener != null ) {
String sync = BasePropertyHandler.getProperty( SYNC_TRANS );
if ( Boolean.parseBoolean( sync ) ) {
listener.syncMetaName( meta, Const.createName( filename ) );
delegates.tabs.renameTabs();
}
saved = listener.save( meta, filename, export );
}
return saved;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:48,代码来源:Spoon.java
示例16: setDefault
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
public void setDefault() {
FontData fd;
RGB col;
lastUsedFiles = new ArrayList<LastUsedFile>();
lastUsedRepoFiles = new LinkedHashMap<>();
openTabFiles = new ArrayList<LastUsedFile>();
screens = new Hashtable<String, WindowProperty>();
properties.setProperty( STRING_LOG_LEVEL, getLogLevel() );
properties.setProperty( STRING_LOG_FILTER, getLogFilter() );
if ( display != null ) {
// Set Default Look for all dialogs and sizes.
String prop =
BasePropertyHandler.getProperty( "Default_UI_Properties_Resource", "org.pentaho.di.ui.core.default" );
try {
ResourceBundle bundle = ResourceBundle.getBundle( prop );
if ( bundle != null ) {
Enumeration<String> enumer = bundle.getKeys();
String theKey;
while ( enumer.hasMoreElements() ) {
theKey = enumer.nextElement();
properties.setProperty( theKey, bundle.getString( theKey ) );
}
}
} catch ( Exception ex ) {
// don't throw an exception, but log it.
ex.printStackTrace();
}
fd = getFixedFont();
properties.setProperty( STRING_FONT_FIXED_NAME, fd.getName() );
properties.setProperty( STRING_FONT_FIXED_SIZE, "" + fd.getHeight() );
properties.setProperty( STRING_FONT_FIXED_STYLE, "" + fd.getStyle() );
fd = getDefaultFont();
properties.setProperty( STRING_FONT_DEFAULT_NAME, fd.getName() );
properties.setProperty( STRING_FONT_DEFAULT_SIZE, "" + fd.getHeight() );
properties.setProperty( STRING_FONT_DEFAULT_STYLE, "" + fd.getStyle() );
fd = getDefaultFont();
properties.setProperty( STRING_FONT_GRAPH_NAME, fd.getName() );
properties.setProperty( STRING_FONT_GRAPH_SIZE, "" + fd.getHeight() );
properties.setProperty( STRING_FONT_GRAPH_STYLE, "" + fd.getStyle() );
fd = getDefaultFont();
properties.setProperty( STRING_FONT_GRID_NAME, fd.getName() );
properties.setProperty( STRING_FONT_GRID_SIZE, "" + fd.getHeight() );
properties.setProperty( STRING_FONT_GRID_STYLE, "" + fd.getStyle() );
fd = getDefaultFont();
properties.setProperty( STRING_FONT_NOTE_NAME, fd.getName() );
properties.setProperty( STRING_FONT_NOTE_SIZE, "" + fd.getHeight() );
properties.setProperty( STRING_FONT_NOTE_STYLE, "" + fd.getStyle() );
col = getBackgroundRGB();
properties.setProperty( STRING_BACKGROUND_COLOR_R, "" + col.red );
properties.setProperty( STRING_BACKGROUND_COLOR_G, "" + col.green );
properties.setProperty( STRING_BACKGROUND_COLOR_B, "" + col.blue );
col = getGraphColorRGB();
properties.setProperty( STRING_GRAPH_COLOR_R, "" + col.red );
properties.setProperty( STRING_GRAPH_COLOR_G, "" + col.green );
properties.setProperty( STRING_GRAPH_COLOR_B, "" + col.blue );
properties.setProperty( STRING_ICON_SIZE, "" + getIconSize() );
properties.setProperty( STRING_LINE_WIDTH, "" + getLineWidth() );
properties.setProperty( STRING_SHADOW_SIZE, "" + getShadowSize() );
properties.setProperty( STRING_MAX_UNDO, "" + getMaxUndo() );
setSashWeights( getSashWeights() );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:75,代码来源:PropsUI.java
示例17: reinit
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
protected void reinit() {
replaceWith = BasePropertyHandler.getProperty( "LAFpackage" );
replaceSysBundle = replacePackage( SYSTEM_BUNDLE_PACKAGE );
offset = -1;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:6,代码来源:LAFMessageHandler.java
示例18: getButtonAlignment
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
/**
* Returns the default alignment for the buttons. This is set in the
* LAF properties with the key <code>Button_Position</code>.
* The valid values are:<UL>
* <LI><code>left</code>
* <LI><code>center</code>
* <LI><code>right</code>
* </UL>
* NOTE: if the alignment is not provided or contains an invalid value, <code>center</code>
* will be used as a default
* @return a constant which indicates the button alignment
*/
protected static int getButtonAlignment() {
String buttonAlign = BasePropertyHandler.getProperty("Button_Position", "center").toLowerCase(); //$NON-NLS-1$ //$NON-NLS-2$
if ("center".equals(buttonAlign)) { //$NON-NLS-1$
return BUTTON_ALIGNMENT_CENTER;
} else if ("left".equals(buttonAlign)) { //$NON-NLS-1$
return BUTTON_ALIGNMENT_LEFT;
} else {
return BUTTON_ALIGNMENT_RIGHT;
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:23,代码来源:BaseStepDialog.java
示例19: getButtonAlignment
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
/**
* Returns the default alignment for the buttons. This is set in the
* LAF properties with the key <code>Button_Position</code>.
* The valid values are:<UL>
* <LI><code>left</code>
* <LI><code>center</code>
* <LI><code>right</code>
* </UL>
* NOTE: if the alignment is not provided or contains an invalid value, <code>center</code>
* will be used as a default
*
* @return a constant which indicates the button alignment
*/
protected static int getButtonAlignment() {
String buttonAlign = BasePropertyHandler.getProperty("Button_Position",
"center").toLowerCase(); //$NON-NLS-1$ //$NON-NLS-2$
if ("center".equals(buttonAlign)) { //$NON-NLS-1$
return BUTTON_ALIGNMENT_CENTER;
} else if ("left".equals(buttonAlign)) { //$NON-NLS-1$
return BUTTON_ALIGNMENT_LEFT;
} else {
return BUTTON_ALIGNMENT_RIGHT;
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:25,代码来源:BaseStepXulDialog.java
示例20: getButtonAlignment
import org.pentaho.di.laf.BasePropertyHandler; //导入依赖的package包/类
/**
* Returns the default alignment for the buttons. This is set in the LAF properties with the key
* <code>Button_Position</code>. The valid values are:
* <UL>
* <LI><code>left</code>
* <LI><code>center</code>
* <LI><code>right</code>
* </UL>
* NOTE: if the alignment is not provided or contains an invalid value, <code>center</code> will be used as a default
*
* @return a constant which indicates the button alignment
*/
protected static int getButtonAlignment() {
String buttonAlign = BasePropertyHandler.getProperty( "Button_Position", "center" ).toLowerCase();
if ( "center".equals( buttonAlign ) ) {
return BUTTON_ALIGNMENT_CENTER;
} else if ( "left".equals( buttonAlign ) ) {
return BUTTON_ALIGNMENT_LEFT;
} else {
return BUTTON_ALIGNMENT_RIGHT;
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:BaseStepXulDialog.java
注:本文中的org.pentaho.di.laf.BasePropertyHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论