Search in sources :

Example 1 with SwtXulRunner

use of org.pentaho.ui.xul.swt.SwtXulRunner in project pentaho-kettle by pentaho.

the class XulPreviewRowsDialog method open.

public void open() {
    try {
        KettleXulLoader theLoader = new KettleXulLoader();
        theLoader.setSettingsManager(XulSpoonSettingsManager.getInstance());
        theLoader.setOuterContext(this.shell);
        this.container = theLoader.loadXul(XUL);
        this.controller = new XulPreviewRowsController(this.shell, this.databaseMeta, this.schema, this.table, this.limit);
        this.container.addEventHandler(this.controller);
        this.runner = new SwtXulRunner();
        this.runner.addContainer(this.container);
        this.runner.initialize();
        XulDialog thePreviewDialog = (XulDialog) this.container.getDocumentRoot().getElementById("previewRowsDialog");
        thePreviewDialog.show();
    } catch (Exception e) {
        logger.info(e);
    }
}
Also used : XulDialog(org.pentaho.ui.xul.containers.XulDialog) KettleXulLoader(org.pentaho.di.ui.xul.KettleXulLoader) SwtXulRunner(org.pentaho.ui.xul.swt.SwtXulRunner)

Example 2 with SwtXulRunner

use of org.pentaho.ui.xul.swt.SwtXulRunner in project pentaho-kettle by pentaho.

the class FileOverwriteDialogController method getInstance.

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;
    }
}
Also used : KettleXulLoader(org.pentaho.di.ui.xul.KettleXulLoader) XulDomContainer(org.pentaho.ui.xul.XulDomContainer) XulRunner(org.pentaho.ui.xul.XulRunner) SwtXulRunner(org.pentaho.ui.xul.swt.SwtXulRunner) SwtXulRunner(org.pentaho.ui.xul.swt.SwtXulRunner)

Example 3 with SwtXulRunner

use of org.pentaho.ui.xul.swt.SwtXulRunner 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();
}
Also used : SwtBindingFactory(org.pentaho.ui.xul.swt.SwtBindingFactory) KettleXulLoader(org.pentaho.di.ui.xul.KettleXulLoader) SwtXulRunner(org.pentaho.ui.xul.swt.SwtXulRunner)

Example 4 with SwtXulRunner

use of org.pentaho.ui.xul.swt.SwtXulRunner in project pdi-dataservice-server-plugin by pentaho.

the class DataServiceRemapNoStepsDialog method open.

void open() throws KettleException {
    Document xulDocument;
    try {
        xulDocument = initXul(parent, new KettleXulLoader(), new SwtXulRunner());
    } catch (XulException xulException) {
        throw new KettleException("Failed to initialize RemapNoStepsDialog.", xulException);
    }
    ((SwtDialog) xulDocument.getElementById(XUL_DIALOG_ID)).show();
}
Also used : KettleException(org.pentaho.di.core.exception.KettleException) XulException(org.pentaho.ui.xul.XulException) SwtDialog(org.pentaho.ui.xul.swt.tags.SwtDialog) KettleXulLoader(org.pentaho.di.ui.xul.KettleXulLoader) Document(org.pentaho.ui.xul.dom.Document) SwtXulRunner(org.pentaho.ui.xul.swt.SwtXulRunner)

Example 5 with SwtXulRunner

use of org.pentaho.ui.xul.swt.SwtXulRunner in project pdi-dataservice-server-plugin by pentaho.

the class DataServiceRemapStepChooserDialog method open.

void open() throws KettleException {
    SwtDialog dialog;
    try {
        dialog = (SwtDialog) initXul(parent, new KettleXulLoader(), new SwtXulRunner()).getElementById(XUL_DIALOG_ID);
    } catch (XulException xulException) {
        throw new KettleException("Failed to initialize DataServiceRemapStepChooserDialog.", xulException);
    }
    dialog.show();
}
Also used : KettleException(org.pentaho.di.core.exception.KettleException) XulException(org.pentaho.ui.xul.XulException) SwtDialog(org.pentaho.ui.xul.swt.tags.SwtDialog) KettleXulLoader(org.pentaho.di.ui.xul.KettleXulLoader) SwtXulRunner(org.pentaho.ui.xul.swt.SwtXulRunner)

Aggregations

SwtXulRunner (org.pentaho.ui.xul.swt.SwtXulRunner)10 KettleXulLoader (org.pentaho.di.ui.xul.KettleXulLoader)9 XulException (org.pentaho.ui.xul.XulException)5 KettleException (org.pentaho.di.core.exception.KettleException)4 SwtDialog (org.pentaho.ui.xul.swt.tags.SwtDialog)4 XulRunner (org.pentaho.ui.xul.XulRunner)3 XulDialog (org.pentaho.ui.xul.containers.XulDialog)3 XulDomContainer (org.pentaho.ui.xul.XulDomContainer)2 Document (org.pentaho.ui.xul.dom.Document)2 SwtXulLoader (org.pentaho.ui.xul.swt.SwtXulLoader)2 File (java.io.File)1 DisposeEvent (org.eclipse.swt.events.DisposeEvent)1 DisposeListener (org.eclipse.swt.events.DisposeListener)1 PurRepositoryMeta (org.pentaho.di.repository.pur.PurRepositoryMeta)1 DefaultSettingsManager (org.pentaho.ui.xul.impl.DefaultSettingsManager)1 SwtBindingFactory (org.pentaho.ui.xul.swt.SwtBindingFactory)1