Java Code Examples for org.pentaho.ui.xul.XulRunner

The following examples show how to use org.pentaho.ui.xul.XulRunner. These examples are extracted from open source projects. 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
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
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 Project: pentaho-kettle   Source File: BaseStepGenericXulDialog.java    License: Apache License 2.0 6 votes vote down vote up
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
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 );
  }

}
 
Example 5
@Override
protected XulRunner getRunner() {
  if ( xulRunner == null ) {
    xulRunner = new SwtXulRunner();
  }
  return xulRunner;
}
 
Example 6
Source Project: pentaho-aggdesigner   Source File: UIMain.java    License: GNU General Public License v2.0 4 votes vote down vote up
public void setXulRunner(XulRunner xulRunner) {
  this.xulRunner = xulRunner;
}
 
Example 7
protected abstract XulRunner getRunner();