Search in sources :

Example 1 with XulDeck

use of org.pentaho.ui.xul.containers.XulDeck in project pentaho-kettle by pentaho.

the class TrashBrowseController method selectDeletedFileTable.

private XulTree selectDeletedFileTable(boolean isAdmin) {
    XulDeck treeDeck = (XulDeck) document.getElementById("tree-deck");
    treeDeck.setSelectedIndex(isAdmin ? 1 : 0);
    return (XulTree) document.getElementById(isAdmin ? "deleted-file-table-admin" : "deleted-file-table");
}
Also used : XulDeck(org.pentaho.ui.xul.containers.XulDeck) XulTree(org.pentaho.ui.xul.containers.XulTree)

Example 2 with XulDeck

use of org.pentaho.ui.xul.containers.XulDeck in project data-access by pentaho.

the class MainWizardController method setActiveStep.

public void setActiveStep(final int step) {
    try {
        if (this.steps == null || steps.isEmpty()) {
            return;
        }
        final int oldActiveStep = this.activeStep;
        if (oldActiveStep >= 0) {
            final IWizardStep deactivatingWizardStep = steps.get(oldActiveStep);
            if (step > oldActiveStep) {
                if (!deactivatingWizardStep.stepDeactivatingForward()) {
                    return;
                }
            } else {
                if (!deactivatingWizardStep.stepDeactivatingReverse()) {
                    return;
                }
            }
        }
        this.activeStep = step;
        final IWizardStep activatingWizardStep = steps.get(activeStep);
        updateBindings();
        // update the controller panel
        final XulDeck deck = (XulDeck) document.getElementById(CONTENT_DECK_ELEMENT_ID);
        int index = deck.getChildNodes().indexOf(activatingWizardStep.getUIComponent());
        deck.setSelectedIndex(index);
        selectDataSourceMenuList(activatingWizardStep, index);
        activatingWizardStep.refresh();
        if (activeStep > oldActiveStep) {
            activatingWizardStep.stepActivatingForward();
        } else {
            activatingWizardStep.stepActivatingReverse();
        }
        this.firePropertyChange(ACTIVE_STEP_PROPERTY_NAME, oldActiveStep, this.activeStep);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : XulDeck(org.pentaho.ui.xul.containers.XulDeck) IWizardStep(org.pentaho.platform.dataaccess.datasource.wizard.IWizardStep) XulException(org.pentaho.ui.xul.XulException) InvocationTargetException(java.lang.reflect.InvocationTargetException)

Aggregations

XulDeck (org.pentaho.ui.xul.containers.XulDeck)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 IWizardStep (org.pentaho.platform.dataaccess.datasource.wizard.IWizardStep)1 XulException (org.pentaho.ui.xul.XulException)1 XulTree (org.pentaho.ui.xul.containers.XulTree)1