Search in sources :

Example 11 with TreeNode

use of org.pentaho.di.ui.core.widget.tree.TreeNode 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();
}
Also used : GUIResource(org.pentaho.di.ui.core.gui.GUIResource) TreeNode(org.pentaho.di.ui.core.widget.tree.TreeNode) PartitionsFolderProvider(org.pentaho.di.ui.spoon.tree.provider.PartitionsFolderProvider) Before(org.junit.Before)

Example 12 with TreeNode

use of org.pentaho.di.ui.core.widget.tree.TreeNode in project pentaho-kettle by pentaho.

the class RunConfigurationFolderProvider method createTreeNode.

@Override
public TreeNode createTreeNode(TreeNode parent, String text, Image image) {
    TreeNode treeNode = super.createTreeNode(parent, text, image);
    treeNode.setIndex(0);
    return treeNode;
}
Also used : TreeNode(org.pentaho.di.ui.core.widget.tree.TreeNode)

Example 13 with TreeNode

use of org.pentaho.di.ui.core.widget.tree.TreeNode 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());
        }
    }
}
Also used : GUIResource(org.pentaho.di.ui.core.gui.GUIResource) RunConfiguration(org.pentaho.di.engine.configuration.api.RunConfiguration) TreeNode(org.pentaho.di.ui.core.widget.tree.TreeNode)

Aggregations

TreeNode (org.pentaho.di.ui.core.widget.tree.TreeNode)13 GUIResource (org.pentaho.di.ui.core.gui.GUIResource)6 Before (org.junit.Before)5 KettleException (org.pentaho.di.core.exception.KettleException)2 TransMeta (org.pentaho.di.trans.TransMeta)2 ErrorDialog (org.pentaho.di.ui.core.dialog.ErrorDialog)2 Image (org.eclipse.swt.graphics.Image)1 SlaveServer (org.pentaho.di.cluster.SlaveServer)1 DatabaseMeta (org.pentaho.di.core.database.DatabaseMeta)1 PluginInterface (org.pentaho.di.core.plugins.PluginInterface)1 RunConfiguration (org.pentaho.di.engine.configuration.api.RunConfiguration)1 PartitionSchema (org.pentaho.di.partition.PartitionSchema)1 KettleRepositoryLostException (org.pentaho.di.repository.KettleRepositoryLostException)1 StepMeta (org.pentaho.di.trans.step.StepMeta)1 DatabasesCollector (org.pentaho.di.ui.spoon.DatabasesCollector)1 ClustersFolderProvider (org.pentaho.di.ui.spoon.tree.provider.ClustersFolderProvider)1 DBConnectionFolderProvider (org.pentaho.di.ui.spoon.tree.provider.DBConnectionFolderProvider)1 HopsFolderProvider (org.pentaho.di.ui.spoon.tree.provider.HopsFolderProvider)1 PartitionsFolderProvider (org.pentaho.di.ui.spoon.tree.provider.PartitionsFolderProvider)1 SlavesFolderProvider (org.pentaho.di.ui.spoon.tree.provider.SlavesFolderProvider)1