protected void createHelpWidget(final Composite parent, final Control control, String helpId) { final ImageHyperlink helpWidget = toolkit.createImageHyperlink(parent, SWT.CENTER); Image defaultImage = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_LCL_LINKTO_HELP); helpWidget.setImage(defaultImage); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).applyTo(helpWidget); helpWidget.setToolTipText(JFaceResources.getString(IDialogLabelKeys.HELP_LABEL_KEY)); helpWidget.addMouseListener(new MouseAdapter() { public void mouseDown(MouseEvent e) { control.setFocus(); PlatformUI.getWorkbench().getHelpSystem().displayDynamicHelp(); } }); GridDataFactory.fillDefaults().applyTo(helpWidget); helpWidget.setEnabled(true); setHelpContext(control, helpId); }
/** * * {@inheritDoc} * * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite) */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, JFaceResources.getString(IDialogLabelKeys.OK_LABEL_KEY), true); createButton(parent, IDialogConstants.CANCEL_ID, JFaceResources.getString(IDialogLabelKeys.CANCEL_LABEL_KEY), false); }
/** * Create contents of the button bar. * * @param parent * parent */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, JFaceResources.getString(IDialogLabelKeys.OK_LABEL_KEY), true); createButton(parent, IDialogConstants.CANCEL_ID, JFaceResources.getString(IDialogLabelKeys.CANCEL_LABEL_KEY), false); }