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

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

Introduction

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

Prototype

String HELP_LABEL

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

Click Source Link

Document

The label for help buttons.

Usage

From source file:org.eclipse.jubula.client.ui.rcp.dialogs.NagDialog.java

License:Open Source License

/**
 * create a user info dialog/*from   ww  w . ja  va 2  s .co  m*/
 * 
 * @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.osee.framework.ui.swt.NonmodalWizardDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    if (wizard.isHelpAvailable()) {
        helpButton = createButton(parent, IDialogConstants.HELP_ID, IDialogConstants.HELP_LABEL, false);
    }/*from w ww.  j  a v a 2 s.  c  o  m*/
    if (wizard.needsPreviousAndNextButtons()) {
        createPreviousAndNextButtons(parent);
    }
    finishButton = createButton(parent, IDialogConstants.FINISH_ID, IDialogConstants.FINISH_LABEL, true);
    cancelButton = createCancelButton(parent);
}

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.
 * /*from  w w  w .  j  a v  a2  s  . co m*/
 * 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.tcf.te.ui.jface.dialogs.OptionalMessageDialog.java

License:Open Source License

private Link createHelpLink(Composite parent) {
    Link link = new Link(parent, SWT.WRAP | SWT.NO_FOCUS);
    ((GridLayout) parent.getLayout()).numColumns++;
    link.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
    link.setText("<a>" + IDialogConstants.HELP_LABEL + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$
    link.setToolTipText(IDialogConstants.HELP_LABEL);
    link.addSelectionListener(new SelectionAdapter() {
        @Override/*from ww  w  .j  av a2 s.c om*/
        public void widgetSelected(SelectionEvent e) {
            helpPressed();
        }
    });
    return link;
}

From source file:org.kalypso.contribs.eclipse.jface.wizard.view.WizardView.java

License:Open Source License

protected void createButtonsForButtonBar(final Composite parent) {
    // Reset button; will be invisible if current page is not resetable (see IResetableWizard).
    createButton(parent, RESET_ID,//  w w  w .j  a  v  a2 s  . c o  m
            Messages.getString("org.kalypso.contribs.eclipse.jface.wizard.view.WizardView1"), "doReset", false); //$NON-NLS-1$ //$NON-NLS-2$

    if (m_wizard instanceof IWizard2 && ((IWizard2) m_wizard).hasSaveButton())
        createButton(parent, SAVE_ID,
                Messages.getString("org.kalypso.contribs.eclipse.jface.wizard.view.WizardView2"), "doSave", //$NON-NLS-1$//$NON-NLS-2$
                false);

    if (m_wizard.isHelpAvailable())
        createButton(parent, IDialogConstants.HELP_ID, IDialogConstants.HELP_LABEL, "doHelp", false); //$NON-NLS-1$

    if (m_wizard.needsPreviousAndNextButtons())
        createPreviousAndNextButtons(parent);

    createButton(parent, IDialogConstants.FINISH_ID, IDialogConstants.FINISH_LABEL, "doFinish", //$NON-NLS-1$
            !m_wizard.needsPreviousAndNextButtons());

    if (!(m_wizard instanceof IWizard2) || ((IWizard2) m_wizard).hasCancelButton())
        createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, "doCancel", false); //$NON-NLS-1$
}

From source file:org.modelio.api.ui.ModelioWizardDialog.java

License:Apache License

/**
 * Creates the buttons for this dialog's button bar.
 * <p>/*from   w  w  w  .j ava  2  s.  co  m*/
 * The <code>WizardDialog</code> implementation of this framework method
 * prevents the parent composite's columns from being made equal width in
 * order to remove the margin between the Back and Next buttons.
 * </p>
 * @param parent the parent composite to contain the buttons
 */
@objid("bc1a8716-120f-11e2-b5c6-002564c97630")
@Override
protected void createButtonsForButtonBar(final Composite parent) {
    ((GridLayout) parent.getLayout()).makeColumnsEqualWidth = false;
    if (this.wizard.isHelpAvailable()) {
        this.helpButton = createButton(parent, IDialogConstants.HELP_ID, IDialogConstants.HELP_LABEL, false);
    }
    if (this.wizard.needsPreviousAndNextButtons()) {
        createPreviousAndNextButtons(parent);
    }
    this.finishButton = createButton(parent, IDialogConstants.FINISH_ID, IDialogConstants.FINISH_LABEL, true);
    this.cancelButton = createCancelButton(parent);

    if (parent.getDisplay().getDismissalAlignment() == SWT.RIGHT) {
        // Make the default button the right-most button.
        // See also special code in org.eclipse.jface.dialogs.Dialog#initializeBounds()
        this.finishButton.moveBelow(null);
    }
}

From source file:org.talend.dataprofiler.core.ui.dialog.MatchRuleElementTreeSelectionDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    super.createButtonsForButtonBar(parent);
    if (PluginChecker.isTDQLoaded()) {
        Button help = createButton(parent, IDialogConstants.HELP_ID, IDialogConstants.HELP_LABEL, false);
        help.addSelectionListener(new SelectionAdapter() {

            @Override//from   w  w w. j a v a2  s . c o m
            public void widgetSelected(SelectionEvent e) {
                PlatformUI.getWorkbench().getHelpSystem().displayHelp("org.talend.help.match_rule_selector");//$NON-NLS-1$
            }
        });
    }
}

From source file:org.talend.designer.core.ui.dialog.HelpAvailableDialog.java

License:Open Source License

/**
 * Add create Help Button if {@link #isHelpAvailable()} = true.
 * /*  ww w .  j  a v  a 2s .  co m*/
 * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    if (isHelpAvailable()) {
        createButton(parent, IDialogConstants.HELP_ID, IDialogConstants.HELP_LABEL, false);
    }
    // create OK and Cancel buttons by default
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:org.talend.librariesmanager.ui.dialogs.ExternalModulesInstallDialog.java

License:Open Source License

private Link createHelpLink(Composite parent) {
    Link link = new Link(parent, SWT.WRAP | SWT.NO_FOCUS);
    ((GridLayout) parent.getLayout()).numColumns++;
    link.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
    link.setText("<a>" + IDialogConstants.HELP_LABEL + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$
    link.setToolTipText(IDialogConstants.HELP_LABEL);
    link.addSelectionListener(new SelectionAdapter() {

        @Override// w  w  w. jav  a  2 s  .c o m
        public void widgetSelected(SelectionEvent e) {
            helpPressed();
        }
    });
    return link;
}