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

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

Introduction

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

Prototype

String CANCEL_LABEL

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

Click Source Link

Document

The label for cancel buttons.

Usage

From source file:com.nokia.s60tools.remotecontrol.ui.dialogs.RenameDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    GridLayout gdl = new GridLayout(1, false);
    GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_CENTER);
    parent.setLayout(gdl);/*from w ww .j  av a 2  s.co  m*/
    parent.setLayoutData(gd);

    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);

    if (!allowOriginalName) {
        // Not allowed to return same file name. User needs to modify name before enabling OK button.
        getButton(IDialogConstants.OK_ID).setEnabled(false);
    }
}

From source file:com.nokia.s60tools.testdrop.ui.dialogs.TestDropTargetDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    // Creating the send button
    Button sendButton = createButton(parent, IDialogConstants.OK_ID, SEND_BUTTON_TEXT, true);

    Button cancelButton = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL,
            false);//from ww  w  .ja  v  a 2s  .  c  o  m

    // set context-sensitive help
    PlatformUI.getWorkbench().getHelpSystem().setHelp(sendButton,
            TestDropHelpContextIDs.TESTDROP_SEND_DIALOG_SEND_BUTTON);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(cancelButton,
            TestDropHelpContextIDs.TESTDROP_SEND_DIALOG_CANCEL_BUTTON);

}

From source file:com.nokia.s60tools.testdrop.ui.dialogs.TestDropTargetImageSelectionDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    Button button = null;/*  w ww. java2  s . com*/
    if (staredFromPrederence) {
        button = createButton(parent, IDialogConstants.OK_ID, SAVE_BUTTON_TEXT, true);
    } else {
        button = createButton(parent, IDialogConstants.OK_ID, SEND_BUTTON_TEXT, true);
    }

    Button cancelButton = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL,
            false);

    // set context-sensitive help
    if (button != null) {
        if (staredFromPrederence) {
            PlatformUI.getWorkbench().getHelpSystem().setHelp(button,
                    TestDropHelpContextIDs.TESTDROP_PREFERENCES_DEFAULT_TARGET_DEVICE_IMAGE_SELECTION_DIALOG_SAVE_BUTTON);
            PlatformUI.getWorkbench().getHelpSystem().setHelp(cancelButton,
                    TestDropHelpContextIDs.TESTDROP_PREFERENCES_DEFAULT_TARGET_DEVICE_IMAGE_SELECTION_DIALOG_CANCEL_BUTTON);

        } else {
            PlatformUI.getWorkbench().getHelpSystem().setHelp(button,
                    TestDropHelpContextIDs.TESTDROP_IMAGE_SELECTION_DIALOG_SEND_BUTTON);
            PlatformUI.getWorkbench().getHelpSystem().setHelp(cancelButton,
                    TestDropHelpContextIDs.TESTDROP_IMAGE_SELECTION_DIALOG_CANCEL_BUTTON);

        }
    }
}

From source file:com.nokia.s60tools.ui.dialogs.S60ToolsListBoxDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    // Creating OK button
    Button okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    // Optionally adding context-sensitive help support
    if (contextHelpID != null) {
        PlatformUI.getWorkbench().getHelpSystem().setHelp(okButton, contextHelpID);
    }//  w ww. j a  va 2 s  .  co m
    //if cancel button also required
    if (hasCancelButton) {
        Button cancelButton = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL,
                true);
        // Optionally adding context-sensitive help support
        if (contextHelpID != null) {
            PlatformUI.getWorkbench().getHelpSystem().setHelp(cancelButton, contextHelpID);
        }
    }
}

From source file:com.nokia.sdt.symbian.ui.editors.ArrayEditorDialog.java

License:Open Source License

/**
 * Create contents of the button bar/*from w  w w .ja v  a2s.  co  m*/
 * @param parent
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    // override to create with no default button. The user should
    // be able to press Enter to begin editing in the property sheet but
    // that would trigger the default button.
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:com.nokia.tools.s60.editor.ProjectSaveAsDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:com.nokia.tools.s60.editor.ui.dialogs.ElevenPieceOperationConfirmDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    /*createButton(parent, IDialogConstants.YES_ID,
    IDialogConstants.YES_LABEL, true);/* ww w .  j  a va  2  s  .c  om*/
    createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL,
    false);*/
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:com.nokia.tools.s60.editor.ui.dialogs.MaskDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, "&OK", true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:com.nokia.tools.s60.wizards.PluginInstallationDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, WizardMessages.Plugin_Installation_Install_Button, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
    getButton(IDialogConstants.OK_ID).setEnabled(false);

}

From source file:com.nokia.tools.screen.ui.utils.FileChangeWatchThread.java

License:Open Source License

public static void displayThirdPartyEditorMisssingErrorMessageBox() {
    IBrandingManager branding = BrandingExtensionManager.getBrandingManager();
    Image image = null;//from w  w w .ja v a2 s.  com
    if (branding != null) {
        image = branding.getIconImageDescriptor().createImage();
    }
    MessageDialog dialog = new MessageDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(),
            Messages.FileChangeWatchThread_editorSettingsError, image,
            Messages.FileChangeWatchThread_editorError, 1,
            new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0);
    dialog.open();
    if (image != null) {
        image.dispose();
    }
}