List of usage examples for org.eclipse.jface.dialogs IDialogConstants CANCEL_ID
int CANCEL_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants CANCEL_ID.
Click Source Link
From source file:com.centurylink.mdw.plugin.designer.dialogs.ActivityInstanceDialog.java
License:Apache License
protected void createButtonsForButtonBar(Composite parent) { if (mode.equals(Mode.VIEW)) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); return;// ww w . j ava 2s. c o m } if (mode.equals(Mode.RETRY)) { retryButton = createButton(parent, -1, "Retry", false); retryButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() { public void run() { statusMessage = activity.getProject().getDesignerProxy().retryActivityInstance(activity, activityInstanceVO); } }); if (statusMessage == null || statusMessage.trim().length() == 0) MessageDialog.openInformation(getShell(), "Retry Activity", "Activity instance: " + activityInstanceVO.getId() + " retried"); else MessageDialog.openError(getShell(), "Retry Activity", statusMessage); close(); } }); if (!activity.getProcess().isUserAuthorized(UserRoleVO.PROCESS_EXECUTION)) retryButton.setEnabled(false); } if (mode.equals(Mode.SKIP)) { skipButton = createButton(parent, -1, "Proceed", false); skipButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() { public void run() { statusMessage = activity.getProject().getDesignerProxy().skipActivityInstance(activity, activityInstanceVO, completionCode); } }); if (statusMessage == null || statusMessage.trim().length() == 0) MessageDialog.openInformation(getShell(), "Skip Activity", "Activity instance: " + activityInstanceVO.getId() + " skipped with completion code: " + completionCode + "."); else MessageDialog.openError(getShell(), "Skip Activity", statusMessage); close(); } }); if (!activity.getProcess().isUserAuthorized(UserRoleVO.PROCESS_EXECUTION)) skipButton.setEnabled(false); } createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); }
From source file:com.centurylink.mdw.plugin.designer.dialogs.ArchivedProcessSaveDialog.java
License:Apache License
protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, respondingToClose ? "Save" : "OK", false); if (respondingToClose) { Button dontSaveButton = createButton(parent, IDialogConstants.CLOSE_ID, "Don't Save", true); dontSaveButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { dontSavePressed();//w w w. java2 s.c om } }); dontSaveButton.forceFocus(); } Button cancelButton = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, !respondingToClose); if (!respondingToClose) cancelButton.forceFocus(); }
From source file:com.centurylink.mdw.plugin.designer.dialogs.ExportAsDialog.java
License:Apache License
protected void createButtonsForButtonBar(Composite parent) { Button saveBtn = createButton(parent, IDialogConstants.OK_ID, "Save", false); saveBtn.setEnabled(false);/*from w w w . j a v a 2 s. c o m*/ createButton(parent, IDialogConstants.CANCEL_ID, "Cancel", true); }
From source file:com.centurylink.mdw.plugin.designer.dialogs.ProcessInstanceFilterDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); Button resetButton = createButton(parent, RESET_ID, "Reset", false); resetButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { resetFields();//from w w w. ja v a2s . c o m } }); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.centurylink.mdw.plugin.designer.dialogs.ProcessSaveDialog.java
License:Apache License
protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, respondingToClose ? "Save" : "OK", true); if (respondingToClose) { Button dontSaveButton = createButton(parent, IDialogConstants.CLOSE_ID, "Don't Save", false); dontSaveButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { dontSavePressed();/*from www . ja v a 2 s . c om*/ } }); } createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.centurylink.mdw.plugin.designer.dialogs.ValueDisplayDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { Button okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); okButton.forceFocus();//from ww w . j a v a 2s. co m if (createCancelButton) createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.centurylink.mdw.plugin.designer.dialogs.VersionableImportDialog.java
License:Apache License
protected void createButtonsForButtonBar(Composite parent) { importButton = createButton(parent, IDialogConstants.OK_ID, "Import", true); importButton.setEnabled(false);//from www . j a v a 2 s. co m createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.centurylink.mdw.plugin.designer.dialogs.VersionableSaveDialog.java
License:Apache License
protected void createButtonsForButtonBar(Composite parent) { saveButton = createButton(parent, IDialogConstants.OK_ID, "Save", true); if (versionable.getProject().isProduction()) saveButton.setEnabled(false);/*from w w w . j ava 2 s . c om*/ if (hasCloseWithoutSaveOption) createButton(parent, IDialogConstants.NO_ID, "Don't Save", false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.centurylink.mdw.plugin.designer.dialogs.WorkflowElementDeleteDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, PROMPT, "Prompt", false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.centurylink.mdw.plugin.designer.editors.ViewLayoutEditAttributeDialog.java
License:Apache License
@Override protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.OK_ID) { attributeName = getModelValue(attributeNameField.getText()); if (attributeValueCombo == null) attributeValue = attributeValueField.getText(); else/*from w ww . j a v a 2 s .c o m*/ attributeValue = attributeValueCombo.getText(); okPressed(); } else if (IDialogConstants.CANCEL_ID == buttonId) { cancelPressed(); } }