use of org.pentaho.di.ui.core.gui.GUIResource in project pentaho-kettle by pentaho.
the class TransDebugDialog method refreshStepList.
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()).getAsBitmapForSize(display, ConstUI.ICON_SIZE, ConstUI.ICON_SIZE);
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);
//
if (indexSelected >= 0) {
wSteps.table.setSelection(indexSelected);
showStepDebugInformation();
}
}
use of org.pentaho.di.ui.core.gui.GUIResource in project pentaho-kettle by pentaho.
the class SpoonRefreshDbConnectionsSubtreeTest method setUp.
@Before
public void setUp() throws Exception {
GUIResource guiResource = mock(GUIResource.class);
Spoon spoon = mock(Spoon.class);
dbConnectionFolderProvider = new DBConnectionFolderProvider(guiResource, spoon);
treeNode = new TreeNode();
}
use of org.pentaho.di.ui.core.gui.GUIResource in project pentaho-kettle by pentaho.
the class SpoonRefreshPartitionsSubtreeTest method setUp.
@Before
public void setUp() throws Exception {
GUIResource guiResource = mock(GUIResource.class);
Spoon spoon = mock(Spoon.class);
partitionsFolderProvider = new PartitionsFolderProvider(guiResource, spoon);
treeNode = new TreeNode();
}
use of org.pentaho.di.ui.core.gui.GUIResource in project pentaho-kettle by pentaho.
the class RunConfigurationFolderProvider method refresh.
@Override
public void refresh(AbstractMeta meta, TreeNode treeNode, String filter) {
GUIResource guiResource = GUIResource.getInstance();
for (RunConfiguration runConfiguration : runConfigurationDelegate.load()) {
if (!filterMatch(runConfiguration.getName(), filter)) {
continue;
}
String imageFile = runConfiguration.isReadOnly() ? "images/run_tree_disabled.svg" : "images/run_tree.svg";
TreeNode childTreeNode = createChildTreeNode(treeNode, runConfiguration.getName(), getRunConfigurationImage(guiResource, imageFile));
if (runConfiguration.isReadOnly()) {
childTreeNode.setForeground(getDisabledColor());
}
}
}
use of org.pentaho.di.ui.core.gui.GUIResource in project pentaho-kettle by pentaho.
the class RunConfigurationViewTreeExtension method refreshTree.
private void refreshTree(SelectionTreeExtension selectionTreeExtension) {
TreeItem tiRootName = selectionTreeExtension.getTiRootName();
GUIResource guiResource = selectionTreeExtension.getGuiResource();
TreeItem tiEETitle = createTreeItem(tiRootName, TREE_LABEL, guiResource.getImageFolder(), 0);
for (RunConfiguration runConfiguration : runConfigurationDelegate.load()) {
String imageFile = runConfiguration.isReadOnly() ? "images/run_tree_disabled.svg" : "images/run_tree.svg";
createTreeItem(tiEETitle, runConfiguration.getName(), getRunConfigurationImage(guiResource, imageFile), -1, runConfiguration.isReadOnly());
}
}
Aggregations