use of org.pentaho.di.ui.core.gui.GUIResource in project pdi-dataservice-server-plugin by pentaho.
the class DataServiceViewTreeExtension method refreshTree.
protected void refreshTree(SelectionTreeExtension selectionTreeExtension) {
TransMeta meta = (TransMeta) selectionTreeExtension.getMeta();
TreeItem tiRootName = selectionTreeExtension.getTiRootName();
GUIResource guiResource = selectionTreeExtension.getGuiResource();
TreeItem tiDSTitle = createTreeItem(tiRootName, STRING_DATA_SERVICES, guiResource.getImageFolder());
for (DataServiceMeta dataService : delegate.getDataServices(meta)) {
createTreeItem(tiDSTitle, dataService.getName(), getDataServiceImage(guiResource, dataService));
}
}
use of org.pentaho.di.ui.core.gui.GUIResource in project pentaho-kettle by pentaho.
the class PropsUI method setLook.
public void setLook(final Control control, int style) {
if (this.isOSLookShown() && style != WIDGET_STYLE_FIXED) {
return;
}
final GUIResource gui = GUIResource.getInstance();
Font font = null;
Color background = null;
switch(style) {
case WIDGET_STYLE_DEFAULT:
background = gui.getColorBackground();
if (control instanceof Group && OS.indexOf("mac") > -1) {
control.addPaintListener(new PaintListener() {
@Override
public void paintControl(PaintEvent paintEvent) {
paintEvent.gc.setBackground(gui.getColorBackground());
paintEvent.gc.fillRectangle(2, 0, control.getBounds().width - 8, control.getBounds().height - 20);
}
});
}
// GUIResource.getInstance().getFontDefault();
font = null;
break;
case WIDGET_STYLE_FIXED:
if (!this.isOSLookShown()) {
background = gui.getColorBackground();
}
font = gui.getFontFixed();
break;
case WIDGET_STYLE_TABLE:
background = gui.getColorBackground();
// gui.getFontGrid();
font = null;
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_TOOLBAR:
background = GUIResource.getInstance().getColorDemoGray();
break;
case WIDGET_STYLE_TAB:
background = GUIResource.getInstance().getColorWhite();
CTabFolder tabFolder = (CTabFolder) control;
tabFolder.setSimple(false);
tabFolder.setBorderVisible(true);
// need to make a copy of the tab selection background color to get around PDI-13940
Color c = GUIResource.getInstance().getColorTab();
Color tabColor = new Color(c.getDevice(), c.getRed(), c.getGreen(), c.getBlue());
tabFolder.setSelectionBackground(tabColor);
break;
default:
background = gui.getColorBackground();
// gui.getFontDefault();
font = null;
break;
}
if (font != null && !font.isDisposed()) {
control.setFont(font);
}
if (background != null && !background.isDisposed()) {
if (control instanceof Button) {
Button b = (Button) control;
if ((b.getStyle() & SWT.PUSH) != 0) {
return;
}
}
control.setBackground(background);
}
}
use of org.pentaho.di.ui.core.gui.GUIResource in project pentaho-kettle by pentaho.
the class SpoonRefreshClustersSubtreeTest method setUp.
@Before
public void setUp() throws Exception {
GUIResource guiResource = mock(GUIResource.class);
clustersFolderProvider = new ClustersFolderProvider(guiResource);
treeNode = new TreeNode();
}
use of org.pentaho.di.ui.core.gui.GUIResource in project pentaho-kettle by pentaho.
the class SpoonRefreshHopsSubtreeTest method setUp.
@Before
public void setUp() throws Exception {
GUIResource guiResource = mock(GUIResource.class);
hopsFolderProvider = new HopsFolderProvider(guiResource);
treeNode = new TreeNode();
}
use of org.pentaho.di.ui.core.gui.GUIResource in project pentaho-kettle by pentaho.
the class SpoonRefreshSlavesSubtreeTest method setUp.
@Before
public void setUp() throws Exception {
GUIResource guiResource = mock(GUIResource.class);
slavesFolderProvider = new SlavesFolderProvider(guiResource);
treeNode = new TreeNode();
}
Aggregations