Search in sources :

Example 21 with XulMessageBox

use of org.pentaho.ui.xul.components.XulMessageBox in project pdi-dataservice-server-plugin by pentaho.

the class ParameterGenerationController method removeParameter.

public void removeParameter() throws XulException {
    PushDownOptimizationMeta meta = checkNotNull(model.getSelectedOptimization());
    String parameterName = ((ParameterGeneration) meta.getType()).getParameterName();
    XulMessageBox messageBox = createMessageBox();
    messageBox.setTitle(getString(PKG, "ParameterGenerationController.Delete.Title"));
    messageBox.setMessage(getString(PKG, "ParameterGenerationController.Delete.Message", parameterName));
    messageBox.setIcon(SWT.ICON_QUESTION);
    messageBox.setButtons(new Object[] { SWT.YES, SWT.NO });
    if (messageBox.open() == SWT.YES) {
        model.setSelectedParameter(null);
        model.remove(meta);
    }
}
Also used : ParameterGeneration(org.pentaho.di.trans.dataservice.optimization.paramgen.ParameterGeneration) XulMessageBox(org.pentaho.ui.xul.components.XulMessageBox) PushDownOptimizationMeta(org.pentaho.di.trans.dataservice.optimization.PushDownOptimizationMeta) BaseMessages.getString(org.pentaho.di.i18n.BaseMessages.getString)

Example 22 with XulMessageBox

use of org.pentaho.ui.xul.components.XulMessageBox in project data-access by pentaho.

the class MetadataImportDialogController method showMessagebox.

/**
 * Shows an informational dialog
 *
 * @param title   title of dialog
 * @param message message within dialog
 */
private void showMessagebox(final String title, final String message) {
    XulMessageBox messagebox = new GwtMessageBox() {

        @Override
        public void hide() {
            super.hide();
            if (importCompleteCallback != null) {
                importCompleteCallback.onImportSuccess();
            }
        }
    };
    messagebox.setTitle(title);
    messagebox.setMessage(message);
    messagebox.open();
}
Also used : XulMessageBox(org.pentaho.ui.xul.components.XulMessageBox) GwtMessageBox(org.pentaho.ui.xul.gwt.tags.GwtMessageBox)

Aggregations

XulMessageBox (org.pentaho.ui.xul.components.XulMessageBox)22 XulException (org.pentaho.ui.xul.XulException)12 KettleException (org.pentaho.di.core.exception.KettleException)4 Spoon (org.pentaho.di.ui.spoon.Spoon)3 ErrorDialog (org.pentaho.di.ui.core.dialog.ErrorDialog)2 IUIRole (org.pentaho.di.ui.repository.pur.repositoryexplorer.IUIRole)2 IUIAbsRole (org.pentaho.di.ui.repository.pur.repositoryexplorer.abs.IUIAbsRole)2 IAbsSecurityManager (org.pentaho.di.ui.repository.pur.services.IAbsSecurityManager)2 Image (org.eclipse.swt.graphics.Image)1 Test (org.junit.Test)1 BaseMessages.getString (org.pentaho.di.i18n.BaseMessages.getString)1 JobMeta (org.pentaho.di.job.JobMeta)1 RepositoryLock (org.pentaho.di.repository.pur.model.RepositoryLock)1 TransMeta (org.pentaho.di.trans.TransMeta)1 PushDownOptimizationMeta (org.pentaho.di.trans.dataservice.optimization.PushDownOptimizationMeta)1 ParameterGeneration (org.pentaho.di.trans.dataservice.optimization.paramgen.ParameterGeneration)1 UIRepositoryContent (org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryContent)1 UIRepositoryObject (org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryObject)1 XulComponent (org.pentaho.ui.xul.XulComponent)1 XulDomContainer (org.pentaho.ui.xul.XulDomContainer)1