All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.jface.wizard.IWizard Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 * Copyright (c) 2000, 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jface.wizard;

import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.TrayDialog;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;

/**
 * Interface for a wizard.  A wizard maintains a list of wizard pages,
 * stacked on top of each other in card layout fashion.
 * 

* The class Wizard provides an abstract implementation * of this interface. However, clients are also free to implement this * interface if Wizard does not suit their needs. *

* @see Wizard */ public interface IWizard { /** * Adds any last-minute pages to this wizard. *

* This method is called just before the wizard becomes visible, to give the * wizard the opportunity to add any lazily created pages. *

*/ public void addPages(); /** * Returns whether this wizard could be finished without further user * interaction. *

* The result of this method is typically used by the wizard container to enable * or disable the Finish button. *

* * @return true if the wizard could be finished, * and false otherwise */ public boolean canFinish(); /** * Creates this wizard's controls in the given parent control. *

* The wizard container calls this method to create the controls * for the wizard's pages before the wizard is opened. This allows * the wizard to size correctly; otherwise a resize may occur when * moving to a new page. *

* * @param pageContainer the parent control */ public void createPageControls(Composite pageContainer); /** * Disposes of this wizard and frees all SWT resources. */ public void dispose(); /** * Returns the container of this wizard. * * @return the wizard container, or null if this * wizard has yet to be added to a container */ public IWizardContainer getContainer(); /** * Returns the default page image for this wizard. *

* This image can be used for pages which do not * supply their own image. *

* * @return the default page image */ public Image getDefaultPageImage(); /** * Returns the dialog settings for this wizard. *

* The dialog store is used to record state between * wizard invocations (for example, radio button selections, * last directory, etc.). *

* * @return the dialog settings, or null if none */ public IDialogSettings getDialogSettings(); /** * Returns the successor of the given page. *

* This method is typically called by a wizard page *

* * @param page the page * @return the next page, or null if none */ public IWizardPage getNextPage(IWizardPage page); /** * Returns the wizard page with the given name belonging to this wizard. * * @param pageName the name of the wizard page * @return the wizard page with the given name, or null if none */ public IWizardPage getPage(String pageName); /** * Returns the number of pages in this wizard. * * @return the number of wizard pages */ public int getPageCount(); /** * Returns all the pages in this wizard. * * @return a list of pages */ public IWizardPage[] getPages(); /** * Returns the predecessor of the given page. *

* This method is typically called by a wizard page *

* * @param page the page * @return the previous page, or null if none */ public IWizardPage getPreviousPage(IWizardPage page); /** * Returns the first page to be shown in this wizard. * * @return the first wizard page */ public IWizardPage getStartingPage(); /** * Returns the title bar color for this wizard. * * @return the title bar color */ public RGB getTitleBarColor(); /** * Returns the window title string for this wizard. * * @return the window title string, or null for no title */ public String getWindowTitle(); /** * Returns whether help is available for this wizard. *

* The result of this method is typically used by the container to show or hide a button labeled * "Help". *

*

* Note: This wizard's container might be a {@link TrayDialog} which provides * its own help support that is independent of this property. *

*

* Note 2: In the default {@link WizardDialog} implementation, the "Help" * button only works when {@link org.eclipse.jface.dialogs.IDialogPage#performHelp()} is implemented. *

* * @return true if help is available, false otherwise * @see TrayDialog#isHelpAvailable() * @see TrayDialog#setHelpAvailable(boolean) */ public boolean isHelpAvailable(); /** * Returns whether this wizard needs Previous and Next buttons. *

* The result of this method is typically used by the container. *

* * @return true if Previous and Next buttons are required, * and false if none are needed */ public boolean needsPreviousAndNextButtons(); /** * Returns whether this wizard needs a progress monitor. *

* The result of this method is typically used by the container. *

* * @return true if a progress monitor is required, * and false if none is needed */ public boolean needsProgressMonitor(); /** * Performs any actions appropriate in response to the user * having pressed the Cancel button, or refuse if canceling * now is not permitted. * * @return true to indicate the cancel request * was accepted, and false to indicate * that the cancel request was refused */ public boolean performCancel(); /** * Performs any actions appropriate in response to the user * having pressed the Finish button, or refuse if finishing * now is not permitted. * * Normally this method is only called on the container's * current wizard. However if the current wizard is a nested wizard * this method will also be called on all wizards in its parent chain. * Such parents may use this notification to save state etc. However, * the value the parents return from this method is ignored. * * @return true to indicate the finish request * was accepted, and false to indicate * that the finish request was refused */ public boolean performFinish(); /** * Sets or clears the container of this wizard. * * @param wizardContainer the wizard container, or null */ public void setContainer(IWizardContainer wizardContainer); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy