List of usage examples for org.eclipse.jface.dialogs IDialogConstants HELP_ID
int HELP_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants HELP_ID.
Click Source Link
From source file:com.mindquarry.desktop.preferences.dialog.FilteredPreferenceDialog.java
License:Open Source License
@Override protected void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.OK_ID: { okPressed();//from w ww.j a va 2 s. c o m return; } case IDialogConstants.CANCEL_ID: { cancelPressed(); return; } case IDialogConstants.HELP_ID: { helpPressed(); return; } } }
From source file:eu.esdihumboldt.hale.ui.util.wizard.HaleWizardDialog.java
License:Open Source License
/** * Enables or disabled the help button.// ww w . ja va 2s. co m * * @param enabled the new help button status */ public void setHelpButtonEnabled(boolean enabled) { Button helpButton = getButton(IDialogConstants.HELP_ID); if (helpButton != null) helpButton.setEnabled(enabled); }
From source file:eu.transkribus.swt_canvas.util.ExceptionDetailsErrorDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { // create OK and Details buttons createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createDetailsButton(parent);//ww w . j av a 2 s . co m createButton(parent, IDialogConstants.HELP_ID, "Send bug report", false); getButton(IDialogConstants.HELP_ID).addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { setReturnCode(IDialogConstants.HELP_ID); close(); } }); }
From source file:net.geoprism.shapefile.LocalizedWizardDialog.java
License:Open Source License
/** * Creates the buttons for this dialog's button bar. * <p>// ww w. j a va 2 s . c o 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 */ protected void createButtonsForButtonBar(Composite parent) { ((GridLayout) parent.getLayout()).makeColumnsEqualWidth = false; if (wizard.isHelpAvailable()) { helpButton = createButton(parent, IDialogConstants.HELP_ID, Localizer.getMessage("HELP"), false); } if (wizard.needsPreviousAndNextButtons()) { createPreviousAndNextButtons(parent); } finishButton = createButton(parent, IDialogConstants.FINISH_ID, Localizer.getMessage("FINISH"), true); 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() finishButton.moveBelow(null); } }
From source file:net.refractions.udig.style.sld.editor.internal.EditorDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { // create OK and Cancel buttons by default okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); getShell().setDefaultButton(okButton); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); if (isHelpAvailable) { createButton(parent, IDialogConstants.HELP_ID, IDialogConstants.HELP_LABEL, false); }// w w w . j av a2s . co m }
From source file:org.caleydo.core.gui.util.HelpButtonWizardDialog.java
License:Open Source License
private ToolBar createHelpImageButton(Composite parent, Image image) { ToolBar toolBar = new ToolBar(parent, SWT.FLAT | SWT.NO_FOCUS); ((GridLayout) parent.getLayout()).numColumns++; toolBar.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER)); final Cursor cursor = new Cursor(parent.getDisplay(), SWT.CURSOR_HAND); toolBar.setCursor(cursor);/* w w w . j ava2s .co m*/ toolBar.addDisposeListener(new DisposeListener() { @Override public void widgetDisposed(DisposeEvent e) { cursor.dispose(); } }); helpButton = new ToolItem(toolBar, SWT.PUSH); helpButton.setImage(image); helpButton.setToolTipText(JFaceResources.getString("helpToolTip")); helpButton.setData(new Integer(IDialogConstants.HELP_ID)); helpButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { buttonPressed(((Integer) event.widget.getData()).intValue()); } }); return toolBar; }
From source file:org.eclipse.birt.report.designer.data.ui.property.AbstractPropertyDialog.java
License:Open Source License
protected final void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.OK_ID: { okPressed();//from w w w. j a v a2 s . co m break; } case IDialogConstants.CANCEL_ID: { cancelPressed(); break; } case IDialogConstants.HELP_ID: { performHelp(); break; } default: { super.buttonPressed(buttonId); } } }
From source file:org.eclipse.jubula.client.ui.rcp.dialogs.NagDialog.java
License:Open Source License
/** * {@inheritDoc}//ww w . ja va 2s .co m */ protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.HELP_ID) { Plugin.getHelpSystem().displayHelp(m_helpId); } else { super.buttonPressed(buttonId); } }
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 w w . j ava 2s. com*/ if (wizard.needsPreviousAndNextButtons()) { createPreviousAndNextButtons(parent); } finishButton = createButton(parent, IDialogConstants.FINISH_ID, IDialogConstants.FINISH_LABEL, true); cancelButton = createCancelButton(parent); }
From source file:org.eclipse.ptp.etfw.tau.papiselect.papic.PapiListSelectionDialog.java
License:Open Source License
/** * Add the selection, deselection and help buttons to the dialog. * //from www . j ava2s . c o m * @param composite * org.eclipse.swt.widgets.Composite */ private void addSelectionButtons(Composite composite) { final Composite buttonComposite = new Composite(composite, SWT.NONE); final GridLayout layout = new GridLayout(); layout.numColumns = 0; layout.marginWidth = 0; layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); buttonComposite.setLayout(layout); buttonComposite.setLayoutData(new GridData(SWT.END, SWT.TOP, true, false)); final Button selectButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, Messages.PapiListSelectionDialog_SelectAll, false); SelectionListener listener = new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { final Object[] masterlist = contentProvider.getElements(inputElement); for (final Object element : masterlist) { // System.out.println(masterlist[i]); listViewer.setChecked(element, true); updateGrey(element); } } }; selectButton.addSelectionListener(listener); final Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, Messages.PapiListSelectionDialog_DeselectAll, false); listener = new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { listViewer.setAllChecked(false); listViewer.setAllGrayed(false); } }; deselectButton.addSelectionListener(listener); final Button helpButton = createButton(buttonComposite, IDialogConstants.HELP_ID, Messages.PapiListSelectionDialog_CounterDescs, false); listener = new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { displayPapiDescs(); } }; helpButton.addSelectionListener(listener); }