Search in sources :

Example 1 with XulSpoonResourceBundle

use of org.pentaho.di.ui.spoon.XulSpoonResourceBundle in project pentaho-kettle by pentaho.

the class JobLogDelegate method addToolBar.

private void addToolBar() {
    try {
        XulLoader loader = new KettleXulLoader();
        loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
        ResourceBundle bundle = new XulSpoonResourceBundle(Spoon.class);
        XulDomContainer xulDomContainer = loader.loadXul(XUL_FILE_TRANS_LOG_TOOLBAR, bundle);
        xulDomContainer.addEventHandler(this);
        toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById("nav-toolbar");
        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(jobLogComposite.getShell(), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Title"), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_LOG_TOOLBAR), new Exception(t));
    }
}
Also used : XulSpoonResourceBundle(org.pentaho.di.ui.spoon.XulSpoonResourceBundle) KettleXulLoader(org.pentaho.di.ui.xul.KettleXulLoader) XulLoader(org.pentaho.ui.xul.XulLoader) 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)

Example 2 with XulSpoonResourceBundle

use of org.pentaho.di.ui.spoon.XulSpoonResourceBundle in project pentaho-kettle by pentaho.

the class ImportRulesDialog method addToolBar.

private void addToolBar() {
    try {
        XulLoader loader = new KettleXulLoader();
        loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
        ResourceBundle bundle = new XulSpoonResourceBundle(Spoon.class);
        XulDomContainer xulDomContainer = loader.loadXul(XUL_FILE_TOOLBAR, bundle);
        xulDomContainer.addEventHandler(this);
        toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById("import-rules-toolbar");
        ToolBar swtToolbar = (ToolBar) toolbar.getManagedObject();
        swtToolbar.layout(true, true);
    } catch (Throwable t) {
        LogChannel.GENERAL.logError(Const.getStackTracker(t));
        new ErrorDialog(shell, BaseMessages.getString(PKG, "ImportRulesDialog.Exception.ErrorReadingXULFile.Title"), BaseMessages.getString(PKG, "ImportRulesDialog.Exception.ErrorReadingXULFile.Message", XUL_FILE_TOOLBAR), new Exception(t));
    }
}
Also used : XulSpoonResourceBundle(org.pentaho.di.ui.spoon.XulSpoonResourceBundle) XulLoader(org.pentaho.ui.xul.XulLoader) KettleXulLoader(org.pentaho.di.ui.xul.KettleXulLoader) 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) KettleException(org.pentaho.di.core.exception.KettleException)

Example 3 with XulSpoonResourceBundle

use of org.pentaho.di.ui.spoon.XulSpoonResourceBundle 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 4 with XulSpoonResourceBundle

use of org.pentaho.di.ui.spoon.XulSpoonResourceBundle in project pentaho-kettle by pentaho.

the class TransLogDelegate method addToolBar.

private void addToolBar() {
    try {
        XulLoader loader = new KettleXulLoader();
        loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
        ResourceBundle bundle = new XulSpoonResourceBundle(Spoon.class);
        XulDomContainer xulDomContainer = loader.loadXul(XUL_FILE_TRANS_LOG_TOOLBAR, bundle);
        xulDomContainer.addEventHandler(this);
        toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById("nav-toolbar");
        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(transLogComposite.getShell(), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Title"), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_LOG_TOOLBAR), new Exception(t));
    }
}
Also used : XulSpoonResourceBundle(org.pentaho.di.ui.spoon.XulSpoonResourceBundle) KettleXulLoader(org.pentaho.di.ui.xul.KettleXulLoader) XulLoader(org.pentaho.ui.xul.XulLoader) 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)

Example 5 with XulSpoonResourceBundle

use of org.pentaho.di.ui.spoon.XulSpoonResourceBundle in project pentaho-kettle by pentaho.

the class JobHistoryDelegate method addToolBar.

private void addToolBar() {
    try {
        XulLoader loader = new KettleXulLoader();
        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(jobHistoryComposite.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) XulLoader(org.pentaho.ui.xul.XulLoader) KettleXulLoader(org.pentaho.di.ui.xul.KettleXulLoader) 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)

Aggregations

XulSpoonResourceBundle (org.pentaho.di.ui.spoon.XulSpoonResourceBundle)6 ResourceBundle (java.util.ResourceBundle)5 ToolBar (org.eclipse.swt.widgets.ToolBar)5 ErrorDialog (org.pentaho.di.ui.core.dialog.ErrorDialog)5 KettleXulLoader (org.pentaho.di.ui.xul.KettleXulLoader)5 XulDomContainer (org.pentaho.ui.xul.XulDomContainer)5 XulLoader (org.pentaho.ui.xul.XulLoader)4 KettleValueException (org.pentaho.di.core.exception.KettleValueException)2 KettleException (org.pentaho.di.core.exception.KettleException)1 XulOverlay (org.pentaho.ui.xul.XulOverlay)1 XulEventHandler (org.pentaho.ui.xul.impl.XulEventHandler)1