Example usage for org.eclipse.jface.dialogs IDialogConstants ABORT_LABEL

List of usage examples for org.eclipse.jface.dialogs IDialogConstants ABORT_LABEL

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs IDialogConstants ABORT_LABEL.

Prototype

String ABORT_LABEL

To view the source code for org.eclipse.jface.dialogs IDialogConstants ABORT_LABEL.

Click Source Link

Document

The label for abort buttons.

Usage

From source file:com.agynamix.platform.frontend.dialogs.ProgressBarDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.ABORT_ID, IDialogConstants.ABORT_LABEL, true);
}

From source file:com.aptana.php.debug.core.launch.DebugPortNotificationDialog.java

License:Open Source License

/**
 * Creates a message dialog with a toggle. See the superclass constructor for info on the other parameters.
 * /*from   ww w  .ja  va  2  s .  co  m*/
 * @param parentShell
 *            the parent shell
 * @param dialogTitle
 *            the dialog title, or <code>null</code> if none
 * @param image
 *            the dialog title image, or <code>null</code> if none
 * @param message
 *            the dialog message
 * @param detailedInformation
 *            the details for this message (as an IStatus instance)
 * @param dialogImageType
 *            one of the following values:
 *            <ul>
 *            <li><code>MessageDialog.NONE</code> for a dialog with no image</li>
 *            <li><code>MessageDialog.ERROR</code> for a dialog with an error image</li>
 *            <li><code>MessageDialog.INFORMATION</code> for a dialog with an information image</li>
 *            <li><code>MessageDialog.QUESTION </code> for a dialog with a question image</li>
 *            <li><code>MessageDialog.WARNING</code> for a dialog with a warning image</li>
 *            </ul>
 * @param toggleMessage
 *            the message for the toggle control, or <code>null</code> for the default message
 * @param toggleState
 *            the initial state for the toggle
 */
public DebugPortNotificationDialog(Shell parentShell, String dialogTitle, Image image, String message,
        IStatus detailedInformation, int dialogImageType, String toggleMessage, boolean toggleState) {
    super(parentShell, dialogTitle, image, message, dialogImageType,
            new String[] { IDialogConstants.PROCEED_LABEL, IDialogConstants.ABORT_LABEL }, 0, toggleMessage,
            toggleState);
    this.detailedInformation = detailedInformation;
    setPrefStore(PHPDebugPlugin.getDefault().getPreferenceStore());
    setPrefKey(IPHPDebugCorePreferenceKeys.NOTIFY_NON_STANDARD_PORT);
}

From source file:com.motorola.studio.android.launch.ui.StartedInstancesDialog.java

License:Apache License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    // create OK, Ignore and Abort buttons
    okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    ignoreButton = createButton(parent, IDialogConstants.IGNORE_ID, IDialogConstants.IGNORE_LABEL, false);
    abortButton = createButton(parent, IDialogConstants.ABORT_ID, IDialogConstants.ABORT_LABEL, false);

    ignoreButton.addMouseListener(new MouseListener() {

        public void mouseUp(MouseEvent e) {
            setReturnCode(IDialogConstants.IGNORE_ID);
            close();/*  w  w  w  .  jav  a 2s.c o  m*/
        }

        public void mouseDown(MouseEvent e) {
            //do nothing
        }

        public void mouseDoubleClick(MouseEvent e) {
            //do nothing
        }
    });

    abortButton.addMouseListener(new MouseListener() {

        public void mouseUp(MouseEvent e) {
            setReturnCode(IDialogConstants.ABORT_ID);
            close();
        }

        public void mouseDown(MouseEvent e) {
            //do nothing
        }

        public void mouseDoubleClick(MouseEvent e) {
            //do nothing
        }
    });
}

From source file:com.rinke.solutions.pinball.GlobalExceptionHandler.java

public void showError(Exception e) {
    display.asyncExec(new Runnable() {

        @Override// w ww  .  ja v a  2  s  . c  om
        public void run() {
            if (e instanceof LicenseException) {
                MessageBox messageBox = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);

                messageBox.setText("License problem");
                messageBox.setMessage("This action requires a license. Error message was: " + e.getMessage()
                        + "\nIf you hav a license file please register your key file via menu Help/Register.");
                messageBox.open();
            } else {
                MultiStatus status = createMultiStatus(e.getLocalizedMessage(), e);
                ErrorDialog errorDialog = new ErrorDialog(Display.getCurrent().getActiveShell(), "Error",
                        "Ein unerwarteter Fehler ist aufgetreten", status,
                        IStatus.OK | IStatus.INFO | IStatus.WARNING | IStatus.ERROR) {
                    protected void createButtonsForButtonBar(Composite parent) {
                        createButton(parent, IDialogConstants.ABORT_ID, IDialogConstants.ABORT_LABEL, true);
                        createButton(parent, IDialogConstants.PROCEED_ID, IDialogConstants.PROCEED_LABEL,
                                false);
                        createDetailsButton(parent);
                    }

                    @Override
                    protected void buttonPressed(int id) {
                        super.buttonPressed(id);
                        if (id == IDialogConstants.ABORT_ID || id == IDialogConstants.PROCEED_ID) {
                            setReturnCode(id);
                            close();
                        }
                    }

                };
                int ret = errorDialog.open();
                if (ret == IDialogConstants.ABORT_ID)
                    System.exit(1);
            }
            //System.out.println(ret); // cancel = 1
            lastException = null;
        }
    });
}

From source file:com.salesforce.ide.core.internal.utils.DialogUtils.java

License:Open Source License

public int retryAbortMessage(String title, String message) {
    // retry is the default
    MessageDialog dialog = new MessageDialog(getShell(), title, null, message, MessageDialog.ERROR,
            new String[] { IDialogConstants.RETRY_LABEL, IDialogConstants.ABORT_LABEL },
            IDialogConstants.RETRY_ID);/* w w  w.j a  v  a  2s  .com*/
    return dialog.open();
}

From source file:com.salesforce.ide.core.internal.utils.DialogUtils.java

License:Open Source License

public int retryAbortCancelMessage(String title, String message) {
    // retry is the default
    MessageDialog dialog = new MessageDialog(getShell(), title, null, message, MessageDialog.ERROR,
            new String[] { IDialogConstants.RETRY_LABEL, IDialogConstants.ABORT_LABEL,
                    IDialogConstants.CANCEL_LABEL },
            IDialogConstants.RETRY_ID);//w  ww  .j  av a 2s . c  om
    return dialog.open();
}

From source file:com.salesforce.ide.core.internal.utils.DialogUtils.java

License:Open Source License

public int abortOkMessage(String title, String message, int severity) {
    // ok is the default
    MessageDialog dialog = new MessageDialog(getShell(), title, null, message, severity,
            new String[] { IDialogConstants.ABORT_LABEL, IDialogConstants.OK_LABEL }, IDialogConstants.OK_ID);
    return dialog.open();
}

From source file:com.salesforce.ide.core.internal.utils.DialogUtils.java

License:Open Source License

public int abortContinueMessage(String title, String message, int severity) {
    // ok is the default
    MessageDialog dialog = new MessageDialog(getShell(), title, null, message, severity,
            new String[] { IDialogConstants.ABORT_LABEL, CONTINUE_LABEL }, 1);
    return dialog.open();
}

From source file:com.salesforce.ide.core.internal.utils.DialogUtils.java

License:Open Source License

public int abortMessage(String title, String message) {
    // ok is the default
    MessageDialog dialog = new MessageDialog(getShell(), title, null, message, MessageDialog.ERROR,
            new String[] { IDialogConstants.ABORT_LABEL }, IDialogConstants.ABORT_ID);
    return dialog.open();
}

From source file:com.salesforce.ide.ui.wizards.project.ProjectOrganizationPage.java

License:Open Source License

private int createOfflineAbortRetryMessage(String title, String message) {
    // retry is the default
    MessageDialog dialog = new MessageDialog(getShell(), title, null, message, MessageDialog.ERROR,
            new String[] { "Create Offline", IDialogConstants.ABORT_LABEL, IDialogConstants.RETRY_LABEL },
            IDialogConstants.RETRY_ID);/*from   w  w  w. j av a 2 s.c o m*/
    return dialog.open();
}