Search in sources :

Example 11 with XulDialog

use of org.pentaho.ui.xul.containers.XulDialog in project data-access by pentaho.

the class MessageHandler method closeSuccessDetailsDialog.

@Bindable
public void closeSuccessDetailsDialog() {
    XulDialog detailedSuccessDialog = (XulDialog) document.getElementById("successDetailsDialog");
    detailedSuccessDialog.hide();
}
Also used : XulDialog(org.pentaho.ui.xul.containers.XulDialog) Bindable(org.pentaho.ui.xul.stereotype.Bindable)

Example 12 with XulDialog

use of org.pentaho.ui.xul.containers.XulDialog in project pentaho-kettle by pentaho.

the class XulDatabaseExplorerDialog method open.

public boolean open() {
    try {
        KettleXulLoader theLoader = new KettleXulLoader();
        theLoader.setSettingsManager(XulSpoonSettingsManager.getInstance());
        theLoader.setSettingsManager(new DefaultSettingsManager(new File(Const.getKettleDirectory() + Const.FILE_SEPARATOR + "xulSettings.properties")));
        theLoader.setOuterContext(this.shell);
        this.container = theLoader.loadXul(XUL, new XulDatabaseExplorerResourceBundle());
        XulDialog theExplorerDialog = (XulDialog) this.container.getDocumentRoot().getElementById("databaseExplorerDialog");
        SpoonPluginManager.getInstance().applyPluginsForContainer("database_dialog", container);
        this.controller = new XulDatabaseExplorerController((Shell) theExplorerDialog.getRootObject(), this.databaseMeta, this.databases, look);
        this.container.addEventHandler(this.controller);
        this.runner = new SwtXulRunner();
        this.runner.addContainer(this.container);
        this.runner.initialize();
        this.controller.setSelectedSchemaAndTable(schemaName, selectedTable);
        // show dialog if connection is success only.
        if (controller.getActionStatus() == UiPostActionStatus.OK) {
            theExplorerDialog.show();
        }
    } catch (Exception e) {
        LogChannel.GENERAL.logError("Error exploring database", e);
    }
    return this.controller.getSelectedTable() != null;
}
Also used : Shell(org.eclipse.swt.widgets.Shell) XulDialog(org.pentaho.ui.xul.containers.XulDialog) KettleXulLoader(org.pentaho.di.ui.xul.KettleXulLoader) File(java.io.File) SwtXulRunner(org.pentaho.ui.xul.swt.SwtXulRunner) DefaultSettingsManager(org.pentaho.ui.xul.impl.DefaultSettingsManager)

Example 13 with XulDialog

use of org.pentaho.ui.xul.containers.XulDialog in project pentaho-kettle by pentaho.

the class XulPreviewRowsController method accept.

public void accept() {
    XulDialog theDialog = (XulDialog) super.document.getElementById("previewRowsDialog");
    theDialog.setVisible(false);
}
Also used : XulDialog(org.pentaho.ui.xul.containers.XulDialog)

Example 14 with XulDialog

use of org.pentaho.ui.xul.containers.XulDialog in project pentaho-kettle by pentaho.

the class XulStepFieldsController method cancelDialog.

public void cancelDialog() {
    XulDialog theDialog = (XulDialog) super.document.getElementById("stepFieldsDialog");
    theDialog.setVisible(false);
}
Also used : XulDialog(org.pentaho.ui.xul.containers.XulDialog)

Example 15 with XulDialog

use of org.pentaho.ui.xul.containers.XulDialog in project pentaho-kettle by pentaho.

the class XulStepFieldsDialog method open.

public void open(boolean isAcceptButtonHidden) {
    try {
        KettleXulLoader theLoader = new KettleXulLoader();
        theLoader.setOuterContext(this.shell);
        theLoader.setSettingsManager(XulSpoonSettingsManager.getInstance());
        this.container = theLoader.loadXul(XUL);
        this.controller = new XulStepFieldsController(this.shell, this.databaseMeta, this.schemaTableCombo, this.rowMeta);
        this.controller.setShowAcceptButton(isAcceptButtonHidden);
        this.container.addEventHandler(this.controller);
        this.runner = new SwtXulRunner();
        this.runner.addContainer(this.container);
        this.runner.initialize();
        XulDialog thePreviewDialog = (XulDialog) this.container.getDocumentRoot().getElementById("stepFieldsDialog");
        thePreviewDialog.show();
        ((SwtDialog) thePreviewDialog).dispose();
    } catch (Exception e) {
        logger.info(e);
    }
}
Also used : SwtDialog(org.pentaho.ui.xul.swt.tags.SwtDialog) XulDialog(org.pentaho.ui.xul.containers.XulDialog) KettleXulLoader(org.pentaho.di.ui.xul.KettleXulLoader) SwtXulRunner(org.pentaho.ui.xul.swt.SwtXulRunner)

Aggregations

XulDialog (org.pentaho.ui.xul.containers.XulDialog)16 KettleXulLoader (org.pentaho.di.ui.xul.KettleXulLoader)3 XulLabel (org.pentaho.ui.xul.components.XulLabel)3 SwtXulRunner (org.pentaho.ui.xul.swt.SwtXulRunner)3 Shell (org.eclipse.swt.widgets.Shell)2 KettleException (org.pentaho.di.core.exception.KettleException)2 XulDomContainer (org.pentaho.ui.xul.XulDomContainer)2 XulException (org.pentaho.ui.xul.XulException)2 Bindable (org.pentaho.ui.xul.stereotype.Bindable)2 File (java.io.File)1 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 RowLayout (org.eclipse.swt.layout.RowLayout)1 Button (org.eclipse.swt.widgets.Button)1 Label (org.eclipse.swt.widgets.Label)1 IDatasourceSummary (org.pentaho.platform.dataaccess.datasource.wizard.IDatasourceSummary)1 MultiTableDatasourceDTO (org.pentaho.platform.dataaccess.datasource.wizard.service.impl.MultiTableDatasourceDTO)1 DatabaseConnectionDialog (org.pentaho.ui.database.DatabaseConnectionDialog)1 XulTextbox (org.pentaho.ui.xul.components.XulTextbox)1 XulRoot (org.pentaho.ui.xul.containers.XulRoot)1