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;
}
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());
}
}
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();
}
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("");
}
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);
}
}
Aggregations