use of org.pentaho.ui.xul.XulException in project pentaho-kettle by pentaho.
the class FragmentHandler method loadDatabaseOptionsFragment.
protected void loadDatabaseOptionsFragment(String fragmentUri) throws XulException {
XulComponent groupElement = document.getElementById("database-options-box");
XulComponent parentElement = groupElement.getParent();
XulDomContainer fragmentContainer;
try {
// Get new group box fragment ...
// This will effectively set up the SWT parent child relationship...
fragmentContainer = this.xulDomContainer.loadFragment(fragmentUri, Messages.getBundle());
XulComponent newGroup = fragmentContainer.getDocumentRoot().getFirstChild();
parentElement.replaceChild(groupElement, newGroup);
} catch (XulException e) {
e.printStackTrace();
throw e;
}
}
use of org.pentaho.ui.xul.XulException in project pentaho-kettle by pentaho.
the class FragmentHandler method showMessage.
protected void showMessage(String message) {
try {
XulMessageBox box = (XulMessageBox) document.createElement("messagebox");
box.setMessage(message);
box.open();
} catch (XulException e) {
System.out.println("Error creating messagebox " + e.getMessage());
}
}
use of org.pentaho.ui.xul.XulException in project pentaho-kettle by pentaho.
the class DataHandler method showMessage.
protected void showMessage(String message, boolean scroll) {
try {
XulMessageBox box = (XulMessageBox) document.createElement("messagebox");
box.setMessage(message);
box.setModalParent(((XulRoot) document.getElementById("general-datasource-window")).getRootObject());
if (scroll) {
box.setScrollable(true);
box.setWidth(500);
box.setHeight(400);
}
box.open();
} catch (XulException e) {
System.out.println("Error creating messagebox " + e.getMessage());
}
}
use of org.pentaho.ui.xul.XulException in project pentaho-kettle by pentaho.
the class PurRepositoryDialog method displayRepositoryAlreadyExistMessage.
private void displayRepositoryAlreadyExistMessage(String name) {
try {
XulMessageBox messageBox = (XulMessageBox) container.getDocumentRoot().createElement("messagebox");
// $NON-NLS-1$
messageBox.setTitle(resourceBundle.getString("Dialog.Error"));
// $NON-NLS-1$
messageBox.setAcceptLabel(resourceBundle.getString("Dialog.Ok"));
// $NON-NLS-1$
messageBox.setMessage(BaseMessages.getString(PKG, "PurRepositoryDialog.Dialog.ErrorIdExist.Message", name));
messageBox.open();
} catch (XulException e) {
throw new RuntimeException(e);
}
}
use of org.pentaho.ui.xul.XulException in project pentaho-kettle by pentaho.
the class AbsController method initializeLogicalSystemRolesUI.
/**
* Initialized the ActionPermissions UI with all the possible values from LogicalSystemRoles enum
*/
private void initializeLogicalSystemRolesUI() {
try {
Map<String, String> logicalRoles = ((IAbsSecurityManager) service).getAllLogicalRoles(GlobalMessages.getLocale().getDisplayName());
for (Entry<String, String> logicalRole : logicalRoles.entrySet()) {
XulCheckbox logicalSystemRoleCheckbox;
// $NON-NLS-1$
logicalSystemRoleCheckbox = (XulCheckbox) document.createElement("checkbox");
logicalSystemRoleCheckbox.setLabel(logicalRole.getValue());
logicalSystemRoleCheckbox.setId(logicalRole.getValue());
// $NON-NLS-1$
logicalSystemRoleCheckbox.setCommand("iSecurityController.updateSystemRoleActionPermission()");
logicalSystemRoleCheckbox.setFlex(1);
logicalSystemRoleCheckbox.setDisabled(true);
logicalSystemRolesBox.addChild(logicalSystemRoleCheckbox);
logicalSystemRoleChecboxMap.put(logicalSystemRoleCheckbox, logicalRole.getKey());
bf.setBindingType(Binding.Type.ONE_WAY);
// $NON-NLS-1$ //$NON-NLS-2$
bf.createBinding(systemRoleListBox, "selectedIndex", logicalSystemRoleCheckbox, "disabled", buttonConverter);
}
} catch (XulException xe) {
} catch (KettleException xe) {
}
}
Aggregations