use of org.pentaho.di.ui.xul.KettleXulLoader 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));
}
}
use of org.pentaho.di.ui.xul.KettleXulLoader 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));
}
}
use of org.pentaho.di.ui.xul.KettleXulLoader 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));
}
}
use of org.pentaho.di.ui.xul.KettleXulLoader in project pentaho-kettle by pentaho.
the class BaseStepXulDialog method initializeXul.
protected void initializeXul() throws XulException {
initializeXul(new KettleXulLoader(), new SwtBindingFactory(), new SwtXulRunner(), parent);
dialogShell = (Shell) xulDialog.getRootObject();
}
use of org.pentaho.di.ui.xul.KettleXulLoader in project pdi-dataservice-server-plugin by pentaho.
the class DataServiceRemapConfirmationDialog method open.
void open() throws KettleException {
Document xulDocument;
try {
xulDocument = initXul(parent, new KettleXulLoader(), new SwtXulRunner());
} catch (XulException e) {
throw new KettleException("Failed to create data service remap confirmation dialog", e);
}
((SwtDialog) xulDocument.getElementById(XUL_DIALOG_ID)).show();
}
Aggregations