List of usage examples for org.eclipse.jface.wizard Wizard setDefaultPageImageDescriptor
public void setDefaultPageImageDescriptor(ImageDescriptor imageDescriptor)
From source file:eu.celar.ui.UIAuthTokenProvider.java
License:Open Source License
/** * Show the new token wizard. If the specified description is not null the wizard will * be started with the wizard page belonging to the specified description. Otherwise it * will be started with the token type page as starting page where the user can choose * the type of the he wants to create.// w ww.j av a 2 s.c o m * * @param tokenWizardId The ID of the token type that should be created or null. * @param forceWizardId * @param description Token description passed to the token specific wizard pages in * order to allow initialisation for a predefined token type. * @return True if the token dialog was closed with status {@link Window#OK}. */ public boolean showNewTokenWizard(final String tokenWizardId, final boolean forceWizardId, final IAuthenticationTokenDescription description) { URL imgUrl = Activator.getDefault().getBundle().getEntry("icons/wizban/newtoken_wiz.gif"); //$NON-NLS-1$ Wizard wizard = new Wizard() { @Override public boolean performFinish() { return false; } @Override public void addPages() { List<String> filterList = null; if (tokenWizardId != null) { filterList = new LinkedList<String>(); filterList.add(tokenWizardId); } ExtPointWizardSelectionListPage page = new ExtPointWizardSelectionListPage(WIZARD_PAGE_NAME, Extensions.AUTH_TOKEN_UI_POINT, filterList, forceWizardId, Messages.getString("UIAuthTokenProvider.wizard_first_page_title"), //$NON-NLS-1$ Messages.getString("UIAuthTokenProvider.wizard_first_page_description"), //$NON-NLS-1$ Messages.getString("UIAuthTokenProvider.noTokenCreator")); //$NON-NLS-1$ // page.setPreselectedId( tokenWizardId, true ); page.setInitData(description); page.setCheatSheetManager(cheatSheetManager); addPage(page); } }; wizard.setNeedsProgressMonitor(true); wizard.setForcePreviousAndNextButtons(true); wizard.setWindowTitle(Messages.getString("UIAuthTokenProvider.wizard_title")); //$NON-NLS-1$ wizard.setDefaultPageImageDescriptor(ImageDescriptor.createFromURL(imgUrl)); WizardDialog dialog = new WizardDialog(this.shell, wizard); return dialog.open() == Window.OK; }
From source file:eu.geclipse.gvid.internal.views.NewGVidDropDownAction.java
License:Open Source License
@Override public void run() { URL imgUrl = Activator.getDefault().getBundle().getEntry("icons/wizban/newconn_wiz.gif"); //$NON-NLS-1$ Wizard wizard = new Wizard() { @Override/* ww w.j a va 2 s . c o m*/ public boolean performFinish() { return false; } @Override public void addPages() { ExtPointWizardSelectionListPage page = new ExtPointWizardSelectionListPage( Messages.getString("NewGVidDropDownAction.selectConnectionType"), //$NON-NLS-1$ EXT_ID_NEW_GVID_WIZARD, Messages.getString("NewGVidDropDownAction.title"), //$NON-NLS-1$ Messages.getString("NewGVidDropDownAction.description"), //$NON-NLS-1$ Messages.getString("NewGVidDropDownAction.noConnectionTypes")); //$NON-NLS-1$ page.setInitData(NewGVidDropDownAction.this.gvidView); addPage(page); } }; wizard.setForcePreviousAndNextButtons(true); wizard.setDefaultPageImageDescriptor(ImageDescriptor.createFromURL(imgUrl)); wizard.setWindowTitle(Messages.getString("NewGVidDropDownAction.newGVidSession")); //$NON-NLS-1$ WizardDialog wizardDialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard); wizardDialog.open(); }
From source file:eu.geclipse.terminal.internal.NewTerminalDropDownAction.java
License:Open Source License
@Override public void run() { URL imgUrl = Activator.getDefault().getBundle().getEntry("icons/wizban/newconn_wiz.gif"); //$NON-NLS-1$ Wizard wizard = new Wizard() { @Override//from ww w . ja v a 2s . c o m public boolean performFinish() { return false; } @Override public void addPages() { ExtPointWizardSelectionListPage page = new ExtPointWizardSelectionListPage( Messages.getString("NewTerminalDropDownAction.selectConnectionType"), //$NON-NLS-1$ EXT_ID_NEW_TERMINAL_WIZARD, Messages.getString("NewTerminalDropDownAction.title"), //$NON-NLS-1$ Messages.getString("NewTerminalDropDownAction.description"), //$NON-NLS-1$ Messages.getString("NewTerminalDropDownAction.noConnectionTypes")); //$NON-NLS-1$ page.setInitData(NewTerminalDropDownAction.this.terminalView); addPage(page); } }; wizard.setForcePreviousAndNextButtons(true); wizard.setDefaultPageImageDescriptor(ImageDescriptor.createFromURL(imgUrl)); wizard.setWindowTitle(Messages.getString("NewTerminalDropDownAction.newTerminalSession")); //$NON-NLS-1$ WizardDialog wizardDialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard); wizardDialog.open(); }
From source file:eu.geclipse.ui.internal.preference.VoPreferencePage.java
License:Open Source License
/** * Trigger the new VO wizard to pop up in order to create a new VO if vo * parameter is null or edit existing vo if vo parameter is specified. * /*from w ww .j av a 2 s. c o m*/ * @param vo To {@link IVirtualOrganization} to be edited. */ protected void editVO(final IVirtualOrganization vo) { URL imgUrl = Activator.getDefault().getBundle().getEntry("icons/wizban/vo_wiz.gif"); //$NON-NLS-1$ Wizard wizard = new Wizard() { @Override public void addPages() { ExtPointWizardSelectionListPage page = new ExtPointWizardSelectionListPage("pagename", //$NON-NLS-1$ "eu.geclipse.ui.newVoWizards", //$NON-NLS-1$ Messages.getString("VoPreferencePage.create_new_vo"), //$NON-NLS-1$ Messages.getString("VoPreferencePage.create_new_vo_long"), //$NON-NLS-1$ Messages.getString("VoPreferencePage.no_vo_providers")); //$NON-NLS-1$ page.setInitData(vo); if (vo != null) { page.setPreselectedId(vo.getWizardId(), true); } addPage(page); } @Override public boolean performFinish() { return false; } }; wizard.setForcePreviousAndNextButtons(true); wizard.setNeedsProgressMonitor(true); wizard.setWindowTitle(Messages.getString("VoPreferencePage.create_new_vo")); //$NON-NLS-1$ wizard.setDefaultPageImageDescriptor(ImageDescriptor.createFromURL(imgUrl)); WizardDialog dialog = new WizardDialog(this.getShell(), wizard); dialog.open(); /* * If no VOs were present before calling the wizard, there is now a default * VO to mark as checked. */ checkDefaultVo(); }
From source file:org.eclipse.emf.converter.ui.ModelConverterDescriptorSelectionPage.java
License:Open Source License
@Override public IWizardPage getNextPage() { IWizard modelConverterWizard = getSelectedNode().getWizard(); if (initializedWizards.add(modelConverterWizard)) { if (modelConverterWizard instanceof Wizard) { Wizard wizard = (Wizard) modelConverterWizard; if (modeConverterWizardDefaultImageDescriptor != null) { wizard.setDefaultPageImageDescriptor(modeConverterWizardDefaultImageDescriptor); }/*from w ww . ja v a 2s. co m*/ if (wizard.getWindowTitle() == null) { wizard.setWindowTitle(getWizard().getWindowTitle()); } } if (modelConverterWizard instanceof IWorkbenchWizard) { ((IWorkbenchWizard) modelConverterWizard).init(workbench, selection); } } adjustModelConverterWizard(modelConverterWizard); IWizardPage wizardPage = super.getNextPage(); IWizardNode wizardNode = getSelectedNode(); if (wizardNode instanceof ModelConverterManager.ModelConverterDescriptorWizardNode) { ((ModelConverterManager.ModelConverterDescriptorWizardNode) wizardNode).setContentCreated(true); } return wizardPage; }
From source file:org.eclipse.jst.pagedesigner.properties.attrgroup.DialogUtil.java
License:Open Source License
/** * Utility method, this method will popup a dialog for user to input * attributes for initialize a sub element. In this method will create a * command and execute it./*from w w w. j a v a 2s . c o m*/ * * @param shell * parent shell for dialog * @param parent * the parent element * @param group * the AttributeGroup * @return true if success, false if user canceled. */ public static boolean createSubElement(Shell shell, final IDOMElement parent, final AttributeGroup group) { group.setElementContext(parent, parent);//2ndParam seems to need to be parent most of the time... don't know why it WAS null... changed 12/19/07 if (group.getDialogFields().length == 0) { //don't show dialog createSubNode(group, parent, Collections.EMPTY_MAP); return true; } final DialogFieldGroupPage page = new DialogFieldGroupPage("", group); //$NON-NLS-1$ page.setTitle(AttributeGroupMessages.getString("DialogUtil.createTitle", group.getTagName())); //$NON-NLS-1$ page.setDescription(AttributeGroupMessages.getString("DialogUtil.createDescription", group.getTagName(), //$NON-NLS-1$ parent.getTagName())); Wizard wizard = new Wizard() { public void addPages() { super.addPage(page); } public boolean performFinish() { DialogField[] fields = group.getDialogFields(); Map map = new HashMap(); for (int i = 0; i < fields.length; i++) { IPropertyPageDescriptor desc = group.getPropertyDescriptor(fields[i]); if (desc != null && fields[i] instanceof ISupportTextValue) { String value = ((ISupportTextValue) fields[i]).getText(); if (value != null && value.length() > 0) { map.put(desc.getAttributeName(), value); } } } createSubNode(group, parent, map); return true; } }; wizard.setWindowTitle(AttributeGroupMessages.getString("DialogUtil.createTitle", group.getTagName())); //$NON-NLS-1$ wizard.setDefaultPageImageDescriptor(PDPlugin.getDefault().getImageDescriptor("newsuade_wiz.gif")); //$NON-NLS-1$ CommonWizardDialog dialog = new CommonWizardDialog(shell, wizard); return dialog.open() == Window.OK; }