List of usage examples for org.eclipse.jface.dialogs IDialogConstants PROCEED_LABEL
String PROCEED_LABEL
To view the source code for org.eclipse.jface.dialogs IDialogConstants PROCEED_LABEL.
Click Source Link
From source file:org.eclipse.gmf.internal.codegen.popup.actions.DiagnosticsDialog.java
License:Open Source License
/** * Opens an dialog to display the given diagnostic and proceed, cancel * buttons.//from w w w. j a v a2s . co m * <p> * * @param parentShell * the parent shell of the dialog, or <code>null</code> if none * @param title * the title to use for this dialog, or <code>null</code> to * indicate that the default title should be used * @param message * the message to show in this dialog, or <code>null</code> to * indicate that the error's message should be shown as the * primary message * @param rootDiagnotic * the diagnostic to show to the user * * @param disableProceed * indicates whether the <code>PROCEED</code> button should be * disabled. * @return the code of the button that was pressed that resulted in this * dialog closing. This will be <code>Dialog.OK</code> if the OK * or <code>Dialog.CANCEL</code> if this dialog's close window * decoration or the ESC key was used. */ public static int openProceedCancel(Shell parentShell, String title, String message, Diagnostic rootDiagnostic, final boolean disableProceed) { DiagnosticsDialog dialog = new DiagnosticsDialog(parentShell, title, message, rootDiagnostic, new String[] { IDialogConstants.PROCEED_LABEL, IDialogConstants.CANCEL_LABEL }, new int[] { IDialogConstants.PROCEED_ID, IDialogConstants.CANCEL_ID }, 0) { @Override protected Control createButtonBar(Composite parent) { Control buttonBar = super.createButtonBar(parent); Button proceedButton = getButton(IDialogConstants.PROCEED_ID); if (proceedButton != null) { proceedButton.setEnabled(!disableProceed); } return buttonBar; } }; return dialog.open(); }
From source file:org.eclipse.jubula.client.ui.rcp.dialogs.NagDialog.java
License:Open Source License
/** * create a user info dialog/* ww w. j av a2 s . c om*/ * * @param msgText I18N text of the message * @param helpId references the specific help instance * @param parentShell the shell to be used as a parent */ private NagDialog(String msgText, String helpId, Shell parentShell) { super(parentShell, Messages.InfoNaggerDialogTitle, null, msgText, MessageDialog.INFORMATION, new String[] { IDialogConstants.HELP_LABEL, IDialogConstants.PROCEED_LABEL }, 0, Messages.InfoNaggerDialogToggleMsg, false); m_helpId = helpId; this.setShellStyle(SWT.TITLE | SWT.BORDER | SWT.APPLICATION_MODAL); // setBlockOnOpen has to be true for using NagDialog in // AUTConfigPropertiesDialog and NewProjectWizard this.setBlockOnOpen(true); }
From source file:org.eclipse.rap.ui.internal.launch.PortBusyStatusHandler.java
License:Open Source License
public Object handleStatus(final IStatus status, final Object source) throws CoreException { RAPLaunchConfig config = (RAPLaunchConfig) source; String title = LaunchMessages.PortBusyStatusHandler_PortInUseTitle; String text = LaunchMessages.PortBusyStatusHandler_PortInUseMessage; Object[] args = new Object[] { new Integer(config.getPort()), config.getName() }; String msg = MessageFormat.format(text, args); String[] buttons = new String[] { IDialogConstants.PROCEED_LABEL, IDialogConstants.CANCEL_LABEL }; MessageDialog dialog = new MessageDialog(getShell(), title, null, msg, MessageDialog.QUESTION, buttons, 0); Boolean result;//from ww w. j av a 2 s .c om if (dialog.open() == IDialogConstants.OK_ID) { result = Boolean.TRUE; } else { result = Boolean.FALSE; } return result; }
From source file:org.eclipse.sirius.common.ui.tools.api.dialog.SiriusMessageDialogWithToggle.java
License:Open Source License
/** * Attempt to find a standard JFace button id that matches the specified * button label. If no match can be found, use the default id provided. * //www . j a v a2 s .c om * Overridden to investigate the provided buttons. * * @param buttonLabel * the button label whose id is sought * @param defaultId * the id to use for the button if there is no standard id * @return the id for the specified button label */ // CHECKSTYLE:OFF private int mapButtonLabelToButtonID(String buttonLabel, int defaultId) { // CHECKSTYLE:OON // Not pretty but does the job... if (IDialogConstants.OK_LABEL.equals(buttonLabel)) { return IDialogConstants.OK_ID; } if (IDialogConstants.YES_LABEL.equals(buttonLabel)) { return IDialogConstants.YES_ID; } if (IDialogConstants.NO_LABEL.equals(buttonLabel)) { return IDialogConstants.NO_ID; } if (IDialogConstants.CANCEL_LABEL.equals(buttonLabel)) { return IDialogConstants.CANCEL_ID; } if (IDialogConstants.YES_TO_ALL_LABEL.equals(buttonLabel)) { return IDialogConstants.YES_TO_ALL_ID; } if (IDialogConstants.SKIP_LABEL.equals(buttonLabel)) { return IDialogConstants.SKIP_ID; } if (IDialogConstants.STOP_LABEL.equals(buttonLabel)) { return IDialogConstants.STOP_ID; } if (IDialogConstants.ABORT_LABEL.equals(buttonLabel)) { return IDialogConstants.ABORT_ID; } if (IDialogConstants.RETRY_LABEL.equals(buttonLabel)) { return IDialogConstants.RETRY_ID; } if (IDialogConstants.IGNORE_LABEL.equals(buttonLabel)) { return IDialogConstants.IGNORE_ID; } if (IDialogConstants.PROCEED_LABEL.equals(buttonLabel)) { return IDialogConstants.PROCEED_ID; } if (IDialogConstants.OPEN_LABEL.equals(buttonLabel)) { return IDialogConstants.OPEN_ID; } if (IDialogConstants.CLOSE_LABEL.equals(buttonLabel)) { return IDialogConstants.CLOSE_ID; } if (IDialogConstants.BACK_LABEL.equals(buttonLabel)) { return IDialogConstants.BACK_ID; } if (IDialogConstants.NEXT_LABEL.equals(buttonLabel)) { return IDialogConstants.NEXT_ID; } if (IDialogConstants.FINISH_LABEL.equals(buttonLabel)) { return IDialogConstants.FINISH_ID; } if (IDialogConstants.HELP_LABEL.equals(buttonLabel)) { return IDialogConstants.HELP_ID; } if (IDialogConstants.NO_TO_ALL_LABEL.equals(buttonLabel)) { return IDialogConstants.NO_TO_ALL_ID; } if (IDialogConstants.SHOW_DETAILS_LABEL.equals(buttonLabel)) { return IDialogConstants.DETAILS_ID; } if (IDialogConstants.HIDE_DETAILS_LABEL.equals(buttonLabel)) { return IDialogConstants.DETAILS_ID; } for (String providedButton : buttonsMap.keySet()) { if (providedButton.equals(buttonLabel)) { return buttonsMap.get(providedButton); } } // No XXX_LABEL in IDialogConstants for these. Unlikely // they would be used in a message dialog though. // public int SELECT_ALL_ID = 18; // public int DESELECT_ALL_ID = 19; // public int SELECT_TYPES_ID = 20; return defaultId; }
From source file:org.eclipse.wst.server.ui.internal.actions.BreakpointDialog.java
License:Open Source License
public BreakpointDialog(Shell parentShell) { super(parentShell, Messages.wizDebugOnServerTitle, null, Messages.dialogBreakpoints, MessageDialog.WARNING, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.PROCEED_LABEL, IDialogConstants.CANCEL_LABEL }, 0);/*from ww w .j a va 2s .c o m*/ }
From source file:org.eclipse.xtend.ide.javaconverter.ConversionProblemsDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.PROCEED_LABEL, true); okButton.setEnabled(true);/* ww w. ja va 2 s.c om*/ createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }