Search in sources :

Example 11 with XulDomContainer

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

the class TransHistoryDelegate method addToolBar.

private void addToolBar() {
    try {
        KettleXulLoader loader = new KettleXulLoader();
        loader.setIconsSize(16, 16);
        loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
        ResourceBundle bundle = new XulSpoonResourceBundle(Spoon.class);
        XulDomContainer xulDomContainer = loader.loadXul(XUL_FILE_TRANS_GRID_TOOLBAR, bundle);
        xulDomContainer.addEventHandler(this);
        toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById("nav-toolbar");
        refreshButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById("refresh-history");
        fetchNextBatchButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById("fetch-next-batch-history");
        fetchAllButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById("fetch-all-history");
        ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
        spoon.props.setLook(swtToolBar, Props.WIDGET_STYLE_TOOLBAR);
        swtToolBar.layout(true, true);
    } catch (Throwable t) {
        log.logError(Const.getStackTracker(t));
        new ErrorDialog(transHistoryComposite.getShell(), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Title"), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_GRID_TOOLBAR), new Exception(t));
    }
}
Also used : XulSpoonResourceBundle(org.pentaho.di.ui.spoon.XulSpoonResourceBundle) ToolBar(org.eclipse.swt.widgets.ToolBar) KettleXulLoader(org.pentaho.di.ui.xul.KettleXulLoader) ErrorDialog(org.pentaho.di.ui.core.dialog.ErrorDialog) XulSpoonResourceBundle(org.pentaho.di.ui.spoon.XulSpoonResourceBundle) ResourceBundle(java.util.ResourceBundle) XulDomContainer(org.pentaho.ui.xul.XulDomContainer) KettleValueException(org.pentaho.di.core.exception.KettleValueException)

Example 12 with XulDomContainer

use of org.pentaho.ui.xul.XulDomContainer in project pdi-dataservice-server-plugin by pentaho.

the class DataServiceRemapNoStepsDialog method initXul.

Document initXul(Composite parent, XulLoader xulLoader, XulRunner xulRunner) throws XulException {
    xulLoader.setOuterContext(parent);
    xulLoader.registerClassLoader(getClass().getClassLoader());
    XulDomContainer container = xulLoader.loadXul(XUL_DIALOG_PATH, createResourceBundle());
    container.addEventHandler(controller);
    xulRunner.addContainer(container);
    xulRunner.initialize();
    return container.getDocumentRoot();
}
Also used : XulDomContainer(org.pentaho.ui.xul.XulDomContainer)

Example 13 with XulDomContainer

use of org.pentaho.ui.xul.XulDomContainer in project pdi-dataservice-server-plugin by pentaho.

the class DataServiceRemapStepChooserDialog method initXul.

Document initXul(Composite parent, XulLoader xulLoader, XulRunner xulRunner) throws XulException {
    xulLoader.setOuterContext(parent);
    xulLoader.registerClassLoader(getClass().getClassLoader());
    XulDomContainer container = xulLoader.loadXul(XUL_DIALOG_PATH, createResourceBundle());
    container.addEventHandler(controller);
    xulRunner.addContainer(container);
    xulRunner.initialize();
    return container.getDocumentRoot();
}
Also used : XulDomContainer(org.pentaho.ui.xul.XulDomContainer)

Example 14 with XulDomContainer

use of org.pentaho.ui.xul.XulDomContainer in project pdi-dataservice-server-plugin by pentaho.

the class DataServiceDialog method loadXul.

protected DataServiceDialog loadXul(Shell shell, XulLoader xulLoader, XulRunner runner) throws XulException {
    xulLoader.setOuterContext(shell);
    xulLoader.registerClassLoader(DataServiceDialog.class.getClassLoader());
    XulDomContainer container = xulLoader.loadXul(XUL_DIALOG_PATH, createResourceBundle(PKG));
    container.addEventHandler(controller);
    runner.addContainer(container);
    runner.initialize();
    return this;
}
Also used : XulDomContainer(org.pentaho.ui.xul.XulDomContainer)

Example 15 with XulDomContainer

use of org.pentaho.ui.xul.XulDomContainer in project pdi-dataservice-server-plugin by pentaho.

the class DataServiceRemapConfirmationDialog method initXul.

Document initXul(Composite parent, XulLoader xulLoader, XulRunner xulRunner) throws XulException {
    xulLoader.setOuterContext(parent);
    xulLoader.registerClassLoader(getClass().getClassLoader());
    XulDomContainer container = xulLoader.loadXul(XUL_DIALOG_PATH, createResourceBundle());
    container.addEventHandler(controller);
    xulRunner.addContainer(container);
    xulRunner.initialize();
    return container.getDocumentRoot();
}
Also used : XulDomContainer(org.pentaho.ui.xul.XulDomContainer)

Aggregations

XulDomContainer (org.pentaho.ui.xul.XulDomContainer)33 ResourceBundle (java.util.ResourceBundle)14 KettleXulLoader (org.pentaho.di.ui.xul.KettleXulLoader)12 ErrorDialog (org.pentaho.di.ui.core.dialog.ErrorDialog)11 XulLoader (org.pentaho.ui.xul.XulLoader)11 ToolBar (org.eclipse.swt.widgets.ToolBar)8 Test (org.junit.Test)8 KettleException (org.pentaho.di.core.exception.KettleException)8 XulException (org.pentaho.ui.xul.XulException)8 XulRunner (org.pentaho.ui.xul.XulRunner)7 Shell (org.eclipse.swt.widgets.Shell)6 XulComponent (org.pentaho.ui.xul.XulComponent)6 XulSpoonResourceBundle (org.pentaho.di.ui.spoon.XulSpoonResourceBundle)5 Document (org.pentaho.ui.xul.dom.Document)5 Before (org.junit.Before)2 KettleValueException (org.pentaho.di.core.exception.KettleValueException)2 TransMeta (org.pentaho.di.trans.TransMeta)2 Spoon (org.pentaho.di.ui.spoon.Spoon)2 DatabaseConnectionDialog (org.pentaho.ui.database.DatabaseConnectionDialog)2 XulDialog (org.pentaho.ui.xul.containers.XulDialog)2