Java Code Examples for org.pentaho.ui.xul.XulRunner#initialize()
The following examples show how to use
org.pentaho.ui.xul.XulRunner#initialize() .
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: AbstractPreviewRowsXulDialog.java From pentaho-kettle with Apache License 2.0 | 6 votes |
protected void initializeXul( XulLoader loader, BindingFactory bindingFactory, XulRunner runner, Object parent ) throws XulException { bf = bindingFactory; this.runner = runner; loader.registerClassLoader( getClass().getClassLoader() ); loader.setSettingsManager( getSettingsManager() ); loader.setOuterContext( parent ); container = loader.loadXul( xulFile, getResourceBundle() ); bf.setDocument( container.getDocumentRoot() ); for ( XulEventHandler h : getEventHandlers() ) { container.addEventHandler( h ); } this.runner.addContainer( container ); // try and get the dialog xulDialog = (XulDialog) container.getDocumentRoot().getRootElement(); runner.initialize(); }
Example 2
Source File: FileOverwriteDialogController.java From pentaho-kettle with Apache License 2.0 | 6 votes |
public static FileOverwriteDialogController getInstance( Shell shell, List<UIRepositoryObject> objects ) { try { KettleXulLoader swtLoader = new KettleXulLoader(); swtLoader.setOuterContext( shell ); swtLoader.setSettingsManager( XulSpoonSettingsManager.getInstance() ); XulDomContainer container = swtLoader.loadXul( "org/pentaho/di/ui/repository/repositoryexplorer/xul/file-overwrite-dialog.xul", resourceBundle ); final XulRunner runner = new SwtXulRunner(); runner.addContainer( container ); FileOverwriteDialogController dialogController = new FileOverwriteDialogController( container, objects ); container.addEventHandler( dialogController ); runner.initialize(); return dialogController; } catch ( Exception e ) { return null; } }
Example 3
Source File: BaseStepGenericXulDialog.java From pentaho-kettle with Apache License 2.0 | 6 votes |
protected void initializeXul( XulLoader loader, BindingFactory bindingFactory, XulRunner runner, Object parent ) throws XulException { bf = bindingFactory; this.runner = runner; loader.registerClassLoader( getClass().getClassLoader() ); loader.setSettingsManager( getSettingsManager() ); loader.setOuterContext( parent ); container = loader.loadXul( xulFile, getResourceBundle() ); bf.setDocument( container.getDocumentRoot() ); for ( XulEventHandler h : getEventHandlers() ) { container.addEventHandler( h ); } this.runner.addContainer( container ); // try and get the dialog xulDialog = (XulDialog) container.getDocumentRoot().getRootElement(); runner.initialize(); }
Example 4
Source File: StandaloneWizard.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 5 votes |
public StandaloneWizard() { wizardController = new LinearWizardController( new WizardEditorModel(), new DefaultBindingFactory() ); wizardController.addPropertyChangeListener( new CloseListener() ); final DataSourceAndQueryStep dataSourceAndQueryStep = new DataSourceAndQueryStep(); // add the steps .. wizardController.addStep( new LookAndFeelStep() ); wizardController.addStep( dataSourceAndQueryStep ); wizardController.addStep( new LayoutStep() ); wizardController.addStep( new FormatStep() ); try { final XulDomContainer mainWizardContainer = new SwingXulLoader().loadXul( MAIN_WIZARD_PANEL ); new WizardContentPanel( wizardController ).addContent( mainWizardContainer ); wizardController.registerMainXULContainer( mainWizardContainer ); final Document documentRoot = mainWizardContainer.getDocumentRoot(); final XulDialog root = (XulDialog) documentRoot.getRootElement(); final Window window = (Window) root.getRootObject(); final DesignTimeContext designTimeContext = new DefaultWizardDesignTimeContext( wizardController.getEditorModel(), window ); dataSourceAndQueryStep.setDesignTimeContext( designTimeContext ); wizardController.setDesignTimeContext( designTimeContext ); final XulRunner runner = new SwingXulRunner(); runner.addContainer( mainWizardContainer ); runner.initialize(); runner.start(); } catch ( Exception e ) { ExceptionDialog.showExceptionDialog( null, "Error", e.getMessage(), e ); } }