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

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

Introduction

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

Prototype

String OK_LABEL

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

Click Source Link

Document

The label for OK buttons.

Usage

From source file:org.apache.directory.studio.common.ui.CommonUIUtils.java

License:Apache License

/**
 * Opens an Information {@link MessageDialog} with the given title and message.
 *
 * @param title the title//from   w  w w. ja  va2s  . c o  m
 * @param message the message
 */
public static void openInformationDialog(String title, String message) {
    MessageDialog dialog = new MessageDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
            title, null, message, MessageDialog.INFORMATION, new String[] { IDialogConstants.OK_LABEL },
            MessageDialog.OK);
    dialog.open();
}

From source file:org.apache.directory.studio.common.ui.CommonUIUtils.java

License:Apache License

/**
 * Opens an Warning {@link MessageDialog} with the given title and message.
 *
 * @param title the title/*from w  w  w.  j a v a 2s .c  om*/
 * @param message the message
 */
public static void openWarningDialog(String title, String message) {
    MessageDialog dialog = new MessageDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
            title, null, message, MessageDialog.WARNING, new String[] { IDialogConstants.OK_LABEL },
            MessageDialog.OK);
    dialog.open();
}

From source file:org.apache.directory.studio.connection.ui.dialogs.CertificateTrustDialog.java

License:Apache License

/**
 * {@inheritDoc}//from  w  w  w.  j  a v  a2  s . c  o m
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.DETAILS_ID,
            Messages.getString("CertificateTrustDialog.ViewCertificate"), false); //$NON-NLS-1$
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false);
}

From source file:org.apache.directory.studio.connection.ui.dialogs.ResetPasswordDialog.java

License:Apache License

/**
 * {@inheritDoc}/*from   www  .jav a 2  s .c  o m*/
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);

    validate();
}

From source file:org.apache.directory.studio.connection.ui.dialogs.SelectReferralConnectionDialog.java

License:Apache License

/**
 * {@inheritDoc}// w w  w .  j av  a  2 s .  c  o m
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    Button okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    okButton.setFocus();
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);

    validate();
}

From source file:org.apache.directory.studio.ldapbrowser.common.dialogs.DeleteDialog.java

License:Apache License

/**
 * Instantiates a new delete dialog./*from  ww w. j av a 2  s.c  o  m*/
 * 
 * @param parentShell the parent shell
 * @param title the title
 * @param message the message
 * @param askForTreeDeleteControl true if the user should be asked if the tree delete control should be used
 */
public DeleteDialog(Shell parentShell, String title, String message, boolean askForTreeDeleteControl) {
    super(parentShell, title, null, message, QUESTION,
            new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, OK);

    this.askForTreeDeleteControl = askForTreeDeleteControl;
    this.useTreeDeleteControl = false;

    if (BrowserCommonActivator.getDefault().getDialogSettings()
            .get(USE_TREE_DELETE_CONTROL_DIALOGSETTING_KEY) == null) {
        BrowserCommonActivator.getDefault().getDialogSettings().put(USE_TREE_DELETE_CONTROL_DIALOGSETTING_KEY,
                false);
    }
}

From source file:org.apache.directory.studio.ldapbrowser.common.dialogs.HexDialog.java

License:Apache License

/**
 * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
 *///w  ww .  j a v  a  2  s . c o  m
protected void createButtonsForButtonBar(Composite parent) {
    if (isEditable(currentData)) {
        createButton(parent, EDIT_AS_TEXT_BUTTON_ID, Messages.getString("HexDialog.EditAsText"), false); //$NON-NLS-1$
    }

    createButton(parent, LOAD_BUTTON_ID, Messages.getString("HexDialog.LoadDataButton"), false); //$NON-NLS-1$
    createButton(parent, SAVE_BUTTON_ID, Messages.getString("HexDialog.SaveDataButton"), false); //$NON-NLS-1$
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:org.apache.directory.studio.ldapbrowser.common.dialogs.preferences.AttributeDialog.java

License:Apache License

/**
 * {@inheritDoc}/*  w ww .j a v a2s . c o m*/
 */
protected void createButtonsForButtonBar(Composite parent) {
    okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);

    validate();
}

From source file:org.apache.directory.studio.ldapbrowser.common.dialogs.ScopeDialog.java

License:Apache License

/**
 * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
 *//*from  ww  w.  j  a  v a 2 s.c om*/
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog.java

License:Apache License

/**
 * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
 *///from   w ww  . j a v a  2s. c om
@Override
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, TOGGLE_BUTTON_ID, Messages.getString("TextDialog.WrapLines"), false, SWT.TOGGLE); //$NON-NLS-1$
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}