org.pentaho.di.ui.spoon.XulSpoonResourceBundle Java Examples
The following examples show how to use
org.pentaho.di.ui.spoon.XulSpoonResourceBundle.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ImportRulesDialog.java From pentaho-kettle with Apache License 2.0 | 6 votes |
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 ) ); } }
Example #2
Source File: JobLogDelegate.java From pentaho-kettle with Apache License 2.0 | 6 votes |
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 ) ); } }
Example #3
Source File: JobHistoryDelegate.java From pentaho-kettle with Apache License 2.0 | 6 votes |
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 ) ); } }
Example #4
Source File: TransHistoryDelegate.java From pentaho-kettle with Apache License 2.0 | 6 votes |
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 ) ); } }
Example #5
Source File: TransLogDelegate.java From pentaho-kettle with Apache License 2.0 | 6 votes |
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 ) ); } }
Example #6
Source File: AbstractRepositoryExplorerUISupport.java From pentaho-kettle with Apache License 2.0 | 5 votes |
public void apply( XulDomContainer container ) throws XulException { this.container = container; container.registerClassLoader( getClass().getClassLoader() ); for ( XulEventHandler handler : handlers ) { container.addEventHandler( handler ); } for ( XulOverlay overlay : overlays ) { if ( overlay instanceof RepositoryExplorerDefaultXulOverlay ) { container.loadOverlay( overlay.getOverlayUri(), new XulSpoonResourceBundle( ( (RepositoryExplorerDefaultXulOverlay) overlay ).getPackageClass() ) ); } else { container.loadOverlay( overlay.getOverlayUri(), overlay.getResourceBundleUri() ); } } }
Example #7
Source File: BaseStepXulDialog.java From pentaho-kettle with Apache License 2.0 | 4 votes |
@Override public ResourceBundle getResourceBundle() { return new XulSpoonResourceBundle( getClassForMessages() ); }