List of usage examples for org.eclipse.jface.dialogs IDialogConstants FINISH_ID
int FINISH_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants FINISH_ID.
Click Source Link
From source file:org.nightlabs.base.ui.wizard.DynamicPathWizardDialog.java
License:Open Source License
@Override protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.FINISH_ID) { IWizardPage currPage = getCurrentPage(); if (currPage instanceof IDynamicPathWizardPage) ((IDynamicPathWizardPage) currPage).onHide(); }// www. j a v a 2 s .c om super.buttonPressed(buttonId); if (getReturnCode() != Window.OK) { IWizardPage currPage = getCurrentPage(); if (currPage instanceof IDynamicPathWizardPage) ((IDynamicPathWizardPage) currPage).onShow(); } for (Object o : getDynamicPathWizardListeners().getListeners()) { IDynamicPathWizardListener l = (IDynamicPathWizardListener) o; l.buttonPressed(buttonId); } }
From source file:org.opengroup.archimate.xmlexchange.XMLExchangeExportProvider.java
License:Open Source License
@Override public void export(IArchimateModel model) throws IOException { WizardDialog dialog = new ExtendedWizardDialog(Display.getCurrent().getActiveShell(), new ExportToXMLWizard(model), "ExportToXMLWizard") { //$NON-NLS-1$ @Override/*from w w w . j a v a 2 s . co m*/ protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); // Change "Finish" to "Save" Button b = getButton(IDialogConstants.FINISH_ID); b.setText("Save"); } }; dialog.open(); }
From source file:org.rssowl.ui.internal.dialogs.fatal.ErrorInfoPage.java
License:Open Source License
@Override public void setVisible(boolean visible) { super.setVisible(visible); /* Transfer Focus to Buttons, otherwise a link is focussed which looks weird */ if (visible) { Button focusButton = ((CustomWizardDialog) getContainer()).getButton(IDialogConstants.NEXT_ID); if (focusButton == null) focusButton = ((CustomWizardDialog) getContainer()).getButton(IDialogConstants.FINISH_ID); if (focusButton != null) focusButton.setFocus();/*w w w . j a va 2 s . c o m*/ } }
From source file:org.rssowl.ui.internal.OwlUI.java
License:Open Source License
/** * @param shell the {@link Shell} as parent of the {@link WizardDialog}. * @param wizard the {@link Wizard} to use in the {@link WizardDialog}. * @param modal if <code>false</code>, the wizard will not be a modal dialog. * @param needsProgressPart <code>true</code> to leave some room for the * {@link ProgressMonitorPart} and <code>false</code> otherwise. * @param dialogSettingsKey the key to use to store dialog settings. * @param pack if <code>true</code>, make the wizard as compact as possible * and <code>false</code> otherwise. * @param finishLabel the label for the finish button or <code>null</code> to * use the default.// ww w . j a va 2 s . c o m */ public static void openWizard(Shell shell, Wizard wizard, final boolean modal, final boolean needsProgressPart, final String dialogSettingsKey, final boolean pack, final String finishLabel) { CustomWizardDialog dialog = new CustomWizardDialog(shell, wizard) { private ProgressMonitorPart progressMonitorPart; @Override protected boolean isResizable() { return true; } @Override protected Control createDialogArea(Composite parent) { Control control = super.createDialogArea(parent); if (progressMonitorPart != null && !needsProgressPart) ((GridData) progressMonitorPart.getLayoutData()).exclude = true; return control; } @Override public boolean close() { progressMonitorPart = null; return super.close(); } @Override protected ProgressMonitorPart createProgressMonitorPart(Composite composite, GridLayout pmlayout) { progressMonitorPart = super.createProgressMonitorPart(composite, pmlayout); return progressMonitorPart; } @Override protected IDialogSettings getDialogBoundsSettings() { if (dialogSettingsKey != null) { IDialogSettings settings = Activator.getDefault().getDialogSettings(); IDialogSettings section = settings.getSection(dialogSettingsKey); if (section != null) return section; return settings.addNewSection(dialogSettingsKey); } return super.getDialogBoundsSettings(); } @Override protected int getShellStyle() { if (modal) return super.getShellStyle(); return SWT.TITLE | SWT.BORDER | SWT.MIN | SWT.RESIZE | SWT.CLOSE | getDefaultOrientation(); } @Override protected int getDialogBoundsStrategy() { return DIALOG_PERSISTSIZE; } @Override protected Button createButton(Composite parent, int id, String label, boolean defaultButton) { if (IDialogConstants.FINISH_ID == id && StringUtils.isSet(finishLabel)) label = finishLabel; return super.createButton(parent, id, label, defaultButton); } @Override protected Point getInitialSize() { if (pack) { int width = Application.IS_WINDOWS ? WINDOWS_PACKED_WIZARD_WIDTH : Application.IS_LINUX ? LINUX_PACKED_WIZARD_WIDTH : MAC_PACKED_WIZARD_WIDTH; return getShell().computeSize(convertHorizontalDLUsToPixels(width), SWT.DEFAULT, true); } return super.getInitialSize(); } }; dialog.setMinimumPageSize(0, 0); dialog.create(); dialog.open(); }
From source file:org.talend.component.ui.wizard.ui.common.GenericWizardDialog.java
License:Open Source License
@Override public void updateButtons() { super.updateButtons(); Form form = getForm();// ww w . j av a2 s. c om Button nextButton = getButton(IDialogConstants.NEXT_ID); if (nextButton != null && nextButton.isEnabled()) { nextButton.setEnabled(form.isAllowForward()); } Button backButton = getButton(IDialogConstants.BACK_ID); if (backButton != null && backButton.isEnabled()) { backButton.setEnabled(form.isAllowBack()); } Button finishButton = getButton(IDialogConstants.FINISH_ID); if (finishButton != null && finishButton.isEnabled()) { finishButton.setEnabled(form.isAllowFinish()); } }
From source file:org.talend.dataprofiler.core.license.LicenseWizardDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); Button button = getButton(IDialogConstants.FINISH_ID); if (button != null) { button.setText(DefaultMessagesImpl.getString("LicenseWizardDialog.accept")); //$NON-NLS-1$ GridData data = new GridData(250, -1); button.setLayoutData(data);//from w w w . j a va2 s.c om } Button buttonCancle = getButton(IDialogConstants.CANCEL_ID); if (buttonCancle != null) { buttonCancle.setText(DefaultMessagesImpl.getString("LicenseWizardDialog.cancel")); //$NON-NLS-1$ GridData data = new GridData(-1, -1); buttonCancle.setLayoutData(data); } }
From source file:org.talend.registration.wizards.license.LicenseWizardDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); Button button = getButton(IDialogConstants.FINISH_ID); if (button != null) { ((GridData) button.getParent().getLayoutData()).horizontalAlignment = SWT.CENTER; button.setText(Messages.getString("LicenseWizard.accept")); //$NON-NLS-1$ GridData data = new GridData(250, -1); button.setLayoutData(data);/*from ww w. j av a2 s . co m*/ } Button buttonCancle = getButton(IDialogConstants.CANCEL_ID); if (buttonCancle != null) { buttonCancle.setText(Messages.getString("LicenseWizard.btnCancle")); //$NON-NLS-1$ GridData data = new GridData(-1, -1); buttonCancle.setLayoutData(data); } }
From source file:org.talend.registration.wizards.register.RegisterWizardDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); Button button = getButton(IDialogConstants.FINISH_ID); if (button != null) { button.setText(Messages.getString("RegisterWizardDialog.ok_button")); //$NON-NLS-1$); }/*from www.j a v a 2 s.c o m*/ }
From source file:org.talend.registration.wizards.register.RegisterWizardPage3.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.FINISH_ID, IDialogConstants.FINISH_LABEL, true); }
From source file:org.talend.registration.wizards.register.RegisterWizardPage3.java
License:Open Source License
@Override protected void buttonPressed(int buttonId) { if (IDialogConstants.FINISH_ID == buttonId) { if (email != null) { saveConnectionBean(email);/* w w w. j a v a 2 s . c o m*/ } close(); } }