Search in sources :

Example 11 with XulMessageBox

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

the class AbstractController method createMessageBox.

public XulMessageBox createMessageBox() throws XulException {
    XulMessageBox messageBox = (XulMessageBox) document.createElement("messagebox");
    messageBox.setModalParent(xulDomContainer.getOuterContext());
    return messageBox;
}
Also used : XulMessageBox(org.pentaho.ui.xul.components.XulMessageBox)

Example 12 with XulMessageBox

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

the class AnalysisImportDialogController method showMessagebox.

/**
 * Shows a informational dialog.
 *
 * @param title   title of dialog
 * @param message message within dialog
 */
private void showMessagebox(final String title, final String message) {
    try {
        // $NON-NLS-1$
        XulMessageBox messagebox = (XulMessageBox) document.createElement("messagebox");
        messagebox.setTitle(title);
        messagebox.setMessage(message);
        int option = messagebox.open();
    } catch (XulException e) {
        Window.alert("Show MessabeBox " + e.getMessage());
    }
}
Also used : XulMessageBox(org.pentaho.ui.xul.components.XulMessageBox) XulException(org.pentaho.ui.xul.XulException)

Example 13 with XulMessageBox

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

the class DatasourceSelectionDialogController method showMessagebox.

/**
 * Shows a informational dialog.
 *
 * @param title   title of dialog
 * @param message message within dialog
 */
private void showMessagebox(final String title, final String message) {
    XulMessageBox messagebox = null;
    try {
        // $NON-NLS-1$
        messagebox = (XulMessageBox) document.createElement("messagebox");
    } catch (XulException e) {
        e.printStackTrace();
        return;
    }
    messagebox.setTitle(title);
    messagebox.setMessage(message);
    messagebox.open();
}
Also used : XulMessageBox(org.pentaho.ui.xul.components.XulMessageBox) XulException(org.pentaho.ui.xul.XulException)

Example 14 with XulMessageBox

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

the class FragmentHandlerTest method testShowMessage.

@Test
public void testShowMessage() throws Exception {
    XulMessageBox messageBox = mock(XulMessageBox.class);
    when(document.createElement("messagebox")).thenReturn(messageBox);
    fragmentHandler.showMessage(null);
    // Generate exception, should see a message in standard output
    when(document.createElement("messagebox")).thenThrow(new XulException());
    fragmentHandler.showMessage("");
}
Also used : XulMessageBox(org.pentaho.ui.xul.components.XulMessageBox) XulException(org.pentaho.ui.xul.XulException) Test(org.junit.Test)

Example 15 with XulMessageBox

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

the class BaseStepGenericXulDialog method showMessage.

public void showMessage(final String message, final String title) {
    try {
        final XulMessageBox msg = (XulMessageBox) document.createElement("messagebox");
        msg.setModalParent(modalParent);
        msg.setTitle(title);
        msg.setMessage(message);
        msg.open();
    } catch (XulException e) {
        log.logError("Error displaying message: {0}", message);
    }
}
Also used : XulMessageBox(org.pentaho.ui.xul.components.XulMessageBox) XulException(org.pentaho.ui.xul.XulException)

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