private void remove() { if (getWindow() != null) { return; } ConfirmationModel model = new ConfirmationModel(); setWindow(model); model.setTitle("Remove Network Interface(s)"); model.setMessage("Network Interface(s)"); java.util.ArrayList<String> items = new java.util.ArrayList<String>(); for (Object item : getSelectedItems()) { VmNetworkInterface a = (VmNetworkInterface) item; items.add(a.getName()); } model.setItems(items); UICommand tempVar = new UICommand("OnRemove", this); tempVar.setTitle("OK"); tempVar.setIsDefault(true); model.getCommands().add(tempVar); UICommand tempVar2 = new UICommand("Cancel", this); tempVar2.setTitle("Cancel"); tempVar2.setIsCancel(true); model.getCommands().add(tempVar2); }
private void disableHook() { if (getWindow() != null) { return; } if (getSelectedItems() == null || getSelectedItems().size() == 0) { return; } ConfirmationModel model = new ConfirmationModel(); setConfirmWindow(model); model.setTitle(ConstantsManager.getInstance().getConstants().confirmDisableGlusterHooks()); model.setHelpTag(HelpTag.disable_hooks); model.setHashName("disable_hooks"); // $NON-NLS-1$ model.setMessage(ConstantsManager.getInstance().getConstants().disableGlusterHooksMessage()); ArrayList<String> list = new ArrayList<String>(); for (GlusterHookEntity hook : getSelectedItems()) { list.add(hook.getName()); } model.setItems(list); UICommand okCommand = UICommand.createDefaultOkUiCommand("OnDisableHook", this); // $NON-NLS-1$ model.getCommands().add(okCommand); UICommand cancelCommand = UICommand.createCancelUiCommand("OnCancelConfirmation", this); // $NON-NLS-1$ model.getCommands().add(cancelCommand); }
private void resetParameter() { if (getWindow() != null) { return; } if (getSelectedItem() == null) { return; } GlusterVolumeOptionEntity selectedOption = getSelectedItem(); ConfirmationModel model = new ConfirmationModel(); setWindow(model); model.setTitle(ConstantsManager.getInstance().getConstants().resetOptionVolumeTitle()); model.setHelpTag(HelpTag.reset_option); model.setHashName("reset_option"); // $NON-NLS-1$ model.setMessage(ConstantsManager.getInstance().getConstants().resetOptionVolumeMsg()); ArrayList<String> list = new ArrayList<String>(); list.add(selectedOption.getKey()); model.setItems(list); UICommand okCommand = UICommand.createDefaultOkUiCommand("OnResetParameter", this); // $NON-NLS-1$ model.getCommands().add(okCommand); UICommand cancelCommand = UICommand.createCancelUiCommand("OnCancel", this); // $NON-NLS-1$ model.getCommands().add(cancelCommand); }
public void remove() { if (getWindow() != null) { return; } ConfirmationModel model = new ConfirmationModel(); setWindow(model); model.setTitle(ConstantsManager.getInstance().getConstants().removeUsersTitle()); model.setHelpTag(HelpTag.remove_user); model.setHashName("remove_user"); // $NON-NLS-1$ ArrayList<String> list = new ArrayList<String>(); for (DbUser item : Linq.<DbUser>cast(getSelectedItems())) { list.add(item.getFirstName()); } model.setItems(list); UICommand tempVar = new UICommand("OnRemove", this); // $NON-NLS-1$ tempVar.setTitle(ConstantsManager.getInstance().getConstants().ok()); tempVar.setIsDefault(true); model.getCommands().add(tempVar); UICommand tempVar2 = new UICommand("Cancel", this); // $NON-NLS-1$ tempVar2.setTitle(ConstantsManager.getInstance().getConstants().cancel()); tempVar2.setIsCancel(true); model.getCommands().add(tempVar2); }
private void remove() { if (getWindow() != null) { return; } ConfirmationModel model = new ConfirmationModel(); setWindow(model); model.setTitle(ConstantsManager.getInstance().getConstants().removeSystemPermissionsTitle()); model.setHelpTag(HelpTag.remove_system_permission); model.setHashName("remove_system_permission"); // $NON-NLS-1$ model.setItems(getSelectedItems()); UICommand tempVar = UICommand.createDefaultOkUiCommand("OnRemove", this); // $NON-NLS-1$ model.getCommands().add(tempVar); UICommand tempVar2 = UICommand.createCancelUiCommand("Cancel", this); // $NON-NLS-1$ model.getCommands().add(tempVar2); }
private void confirmUnplug() { ConfirmationModel model = new ConfirmationModel(); model.setTitle(ConstantsManager.getInstance().getConstants().deactivateVmDisksTitle()); model.setMessage( ConstantsManager.getInstance().getConstants().areYouSureYouWantDeactivateVMDisksMsg()); model.setHashName("deactivate_vm_disk"); // $NON-NLS-1$ setWindow(model); ArrayList<String> items = new ArrayList<String>(); for (Disk selected : getSelectedItems()) { items.add(selected.getDiskAlias()); } model.setItems(items); UICommand unPlug = UICommand.createDefaultOkUiCommand("OnUnplug", this); // $NON-NLS-1$ model.getCommands().add(unPlug); UICommand cancel = UICommand.createCancelUiCommand("Cancel", this); // $NON-NLS-1$ model.getCommands().add(cancel); }
protected void forceCreationWarning(ArrayList<String> usedLunsMessages) { ConfirmationModel confirmationModel = new ConfirmationModel(); setConfirmWindow(confirmationModel); confirmationModel.setTitle(constants.forceStorageDomainCreation()); confirmationModel.setMessage(constants.lunsAlreadyPartOfSD()); confirmationModel.setHelpTag(HelpTag.force_lun_disk_creation); confirmationModel.setHashName("force_lun_disk_creation"); // $NON-NLS-1$ confirmationModel.setItems(usedLunsMessages); UICommand forceSaveCommand = new UICommand("OnForceSave", this); // $NON-NLS-1$ forceSaveCommand.setTitle(constants.ok()); forceSaveCommand.setIsDefault(true); confirmationModel.getCommands().add(forceSaveCommand); UICommand cancelconfirmCommand = new UICommand("CancelConfirm", this); // $NON-NLS-1$ cancelconfirmCommand.setTitle(constants.cancel()); cancelconfirmCommand.setIsCancel(true); confirmationModel.getCommands().add(cancelconfirmCommand); }
private void remove() { if (getWindow() != null) { return; } ConfirmationModel model = new ConfirmationModel(); setWindow(model); model.setTitle(ConstantsManager.getInstance().getConstants().removePermissionTitle()); model.setHelpTag(HelpTag.remove_permission); model.setHashName("remove_permission"); // $NON-NLS-1$ model.setItems(getSelectedItems()); UICommand tempVar = new UICommand("OnRemove", this); // $NON-NLS-1$ tempVar.setTitle(ConstantsManager.getInstance().getConstants().ok()); tempVar.setIsDefault(true); model.getCommands().add(tempVar); UICommand tempVar2 = new UICommand("Cancel", this); // $NON-NLS-1$ tempVar2.setTitle(ConstantsManager.getInstance().getConstants().cancel()); tempVar2.setIsCancel(true); model.getCommands().add(tempVar2); }