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.microsoft.azuretools.core.ui.SrvPriSettingsDialog.java

License:Open Source License

/**
 * Create contents of the button bar.//  w w  w  .  j a va 2s . com
 * @param parent
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    Button btnOk = createButton(parent, IDialogConstants.FINISH_ID, IDialogConstants.OK_LABEL, true);
    btnOk.setEnabled(true);
    btnOk.setText("Start");
    btnOk.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            onOk();
        }
    });
    Button btnCancel = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
    btnCancel.setEnabled(true);
    btnCancel.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
        }
    });
}

From source file:com.microsoft.azuretools.docker.ui.dialogs.AzureExportDockerSshKeysDialog.java

License:Open Source License

/**
 * Create contents of the button bar.//from w  w w.  j a va 2  s  .  c  om
 * @param parent
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, "Save", true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:com.microsoft.azuretools.docker.ui.dialogs.AzureInputDockerLoginCredsDialog.java

License:Open Source License

/**
 * Create contents of the button bar./*ww  w  . ja v  a  2  s.  c  om*/
 * @param parent
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    okButton = createButton(parent, IDialogConstants.OK_ID, resetCredentials ? "Update" : "OK", true);
    okButton.setEnabled(false);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:com.microsoft.tfs.client.common.ui.dialogs.vc.ApplyLabelDialog.java

License:Open Source License

private void createCancelButton(final Composite parent) {
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:com.microsoft.tfs.client.common.ui.dialogs.vc.BranchBranchDialog.java

License:Open Source License

public BranchBranchDialog(final Shell parentShell, final TFSRepository repository, final String branchFromPath,
        String proposedBranchToPath) {
    super(parentShell);
    Check.notNull(repository, "repository"); //$NON-NLS-1$
    Check.notNull(branchFromPath, "branchFromPath"); //$NON-NLS-1$

    this.repository = repository;
    this.branchFromPath = branchFromPath;

    if (proposedBranchToPath == null) {
        proposedBranchToPath = ""; //$NON-NLS-1$
    }//from w  w w  .j  a  v a 2s. c  o m

    branchToPath = proposedBranchToPath;
    setOptionIncludeDefaultButtons(false);
    addButtonDescription(IDialogConstants.OK_ID, Messages.getString("BranchBranchDialog.BranchButtonText"), //$NON-NLS-1$
            true);
    addButtonDescription(IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);

}

From source file:com.microsoft.tfs.client.common.ui.dialogs.vc.ConvertFolderToBranchDialog.java

License:Open Source License

public ConvertFolderToBranchDialog(final Shell parentShell, final TFSItem item, final String user,
        final TFSRepository repository) {
    super(parentShell);
    this.item = item;
    this.user = user;
    setOptionIncludeDefaultButtons(false);
    addButtonDescription(IDialogConstants.OK_ID,
            Messages.getString("ConvertFolderToBranchDialog.ConvertButtonText"), //$NON-NLS-1$
            true);//from  w  ww  .  j  a  v  a  2  s. co  m
    addButtonDescription(IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);

}

From source file:com.microsoft.tfs.client.common.ui.dialogs.vc.DetectLocalChangesDialog.java

License:Open Source License

/**
 * Override to set text on OK button. Simply setting the text,
 * unfortunately, does not size the button properly on OS X.
 *//*from w w w .  ja va 2  s  . co  m*/
@Override
protected void createButtonsForButtonBar(final Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, Messages.getString("ReturnOnlineDialog.PendChangesButtonText"), //$NON-NLS-1$
            true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:com.microsoft.tfs.client.common.ui.dialogs.vc.FindChangesetDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(final Composite parent) {
    if (closeOnlyMode) {
        addButtonDescription(IDialogConstants.CANCEL_ID, IDialogConstants.CLOSE_LABEL, true);
    } else {/*from www.  j  a v  a 2s .  c o  m*/
        addButtonDescription(IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
        addButtonDescription(IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
    }

    super.createButtonsForButtonBar(parent);
}

From source file:com.microsoft.tfs.client.common.ui.dialogs.vc.GatedCheckinDialog.java

License:Open Source License

/**
 * This dialog warns the user of a denied check-in due to changes that
 * affect a build definition marked as a gated check-in. The user chooses
 * the target build definition (if there are multiple) and chooses to
 * re-issue the check-in operation after successfully building the chagnes.
 * An option to override the gated check-in is offered if the user has
 * permissions./*from  w w w . j  av  a  2 s  . c o m*/
 *
 * @param parentShell
 *        The parent for this dialog.
 * @param shelvesetName
 *        The shelveset name created by the server for the denied check-in.
 * @param buildDefinitionNames
 *        The build definition names that are affected by the attempted
 *        check-in.
 * @param buildDefinitionUris
 *        The build uris that are affected by the attempted check-in.
 * @param allowBypassBuild
 *        True if the user is allowed to override the gated check-in.
 * @param allowKeepCheckedOut
 *        <code>true</code> if the user is allowed to keep the files checked
 *        out.
 */
public GatedCheckinDialog(final Shell parentShell, final String shelvesetName,
        final String[] buildDefinitionNames, final String[] buildDefinitionUris, final boolean allowBypassBuild,
        final boolean allowKeepCheckedOut) {
    super(parentShell);

    Check.notNull(shelvesetName, "shelvesetName"); //$NON-NLS-1$
    Check.notNull(buildDefinitionNames, "buildDefinitions"); //$NON-NLS-1$

    this.shelvesetName = shelvesetName;
    this.buildDefinitionNames = buildDefinitionNames;
    this.buildDefinitionUris = buildDefinitionUris;
    this.allowBypassBuild = allowBypassBuild;
    this.allowKeepCheckedOut = allowKeepCheckedOut;

    final ImageHelper imageHelper = new ImageHelper(TFSCommonUIClientPlugin.PLUGIN_ID);
    image = imageHelper.getImage("images/vc/gated.gif"); //$NON-NLS-1$ );

    setOptionIncludeDefaultButtons(false);
    addButtonDescription(IDialogConstants.OK_ID,
            Messages.getString("GatedCheckinDialog.BuildChangesButtonText"), //$NON-NLS-1$
            true);
    addButtonDescription(IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:com.microsoft.tfs.client.common.ui.dialogs.vc.GetDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(final Composite parent) {
    final Button getButton = createButton(parent, IDialogConstants.OK_ID,
            Messages.getString("GetDialog.GetButtonText"), true); //$NON-NLS-1$

    new ButtonValidatorBinding(getButton).bind(serverItemTable.getCheckboxValidator());
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}