本文整理汇总了Java中org.pentaho.di.ui.core.gui.GUIResource.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java GUIResource.getInstance方法的具体用法?Java GUIResource.getInstance怎么用?Java GUIResource.getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.ui.core.gui.GUIResource
的用法示例。
在下文中一共展示了GUIResource.getInstance方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.pentaho.di.ui.core.gui.GUIResource; //导入方法依赖的package包/类
/**
* Initialize the properties: load from disk.
* @param display The Display
* @param t The type of properties file.
*/
public static final void init(Display d, int t)
{
if (props==null)
{
display = d;
props = new PropsUI(t);
// Also init the colors and fonts to use...
GUIResource.getInstance();
}
else
{
throw new RuntimeException("The Properties systems settings are already initialised!");
}
}
示例2: refreshStepList
import org.pentaho.di.ui.core.gui.GUIResource; //导入方法依赖的package包/类
private void refreshStepList() {
GUIResource resource = GUIResource.getInstance();
// Add the list of steps...
//
int maxIconSize=0;
int indexSelected = -1;
wSteps.table.removeAll();
for (int i=0;i<transDebugMeta.getTransMeta().getSteps().size();i++) {
StepMeta stepMeta = transDebugMeta.getTransMeta().getStep(i);
TableItem item = new TableItem(wSteps.table, SWT.NONE);
Image image = resource.getImagesSteps().get(stepMeta.getStepID());
item.setImage(0, image);
item.setText(0, "");
item.setText(1, stepMeta.getName());
if (image.getBounds().width>maxIconSize) maxIconSize=image.getBounds().width;
StepDebugMeta stepDebugMeta = stepDebugMetaMap.get(stepMeta);
if (stepDebugMeta!=null) {
// We have debugging information so we mark the row
//
item.setBackground(resource.getColorLightPentaho());
if (indexSelected<0) indexSelected=i;
}
}
wSteps.removeEmptyRows();
wSteps.optWidth(false);
wSteps.table.getColumn(0).setWidth(maxIconSize+10);
wSteps.table.getColumn(0).setAlignment(SWT.CENTER);
// OK, select the first used step debug line...
//
if (indexSelected>=0) {
wSteps.table.setSelection(indexSelected);
showStepDebugInformation();
}
}
示例3: setLook
import org.pentaho.di.ui.core.gui.GUIResource; //导入方法依赖的package包/类
public void setLook(Control control, int style)
{
if (this.isOSLookShown() && style!=WIDGET_STYLE_FIXED) return;
GUIResource gui = GUIResource.getInstance();
Font font = null;
Color background = null;
// Color tabColor = null;
switch(style)
{
case WIDGET_STYLE_DEFAULT :
background = gui.getColorBackground();
font = null; // GUIResource.getInstance().getFontDefault();
break;
case WIDGET_STYLE_FIXED :
if (!this.isOSLookShown()) background = gui.getColorBackground();
font = gui.getFontFixed();
break;
case WIDGET_STYLE_TABLE :
background = gui.getColorBackground();
font = null; // gui.getFontGrid();
break;
case WIDGET_STYLE_NOTEPAD :
background = gui.getColorBackground();
font = gui.getFontNote();
break;
case WIDGET_STYLE_GRAPH :
background = gui.getColorBackground();
font = gui.getFontGraph();
break;
case WIDGET_STYLE_TAB :
background = gui.getColorBackground();
// font = gui.getFontDefault();
CTabFolder tabFolder = (CTabFolder)control;
tabFolder.setSimple(false);
tabFolder.setBorderVisible(false);
// Set a small vertical gradient
tabFolder.setSelectionBackground(new Color[] {
display.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW),
display.getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW),
},
new int[] { 55, },
true);
break;
default :
background = gui.getColorBackground();
font = null; // gui.getFontDefault();
break;
}
if (font!=null && !font.isDisposed())
{
control.setFont(font);
}
if (background!=null && !background.isDisposed())
{
control.setBackground(background);
}
}