001: /*******************************************************************************
002: * Copyright (c) 2000, 2006 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.jface.wizard;
011:
012: import org.eclipse.jface.operation.IRunnableContext;
013: import org.eclipse.swt.widgets.Shell;
014:
015: /**
016: * Interface for containers that can host a wizard. It displays
017: * wizard pages, at most one of which is considered
018: * the current page. <code>getCurrentPage</code> returns the
019: * current page; <code>showPage</code> programmatically changes the
020: * the current page. Note that the pages need not all belong
021: * to the same wizard.
022: * <p>
023: * The class <code>WizardDialog</code> provides a fully functional
024: * implementation of this interface which will meet the needs of
025: * most clients. However, clients are also free to implement this
026: * interface if <code>WizardDialog</code> does not suit their needs.
027: * </p>
028: * <p>
029: * Implementors are responsible for disposing of their wizards.
030: * </p>
031: *
032: * @see org.eclipse.jface.wizard.IWizardContainer2
033: */
034: public interface IWizardContainer extends IRunnableContext {
035: /**
036: * Returns the current wizard page for this container.
037: *
038: * @return the current wizard page, or <code>null</code> if the container
039: * is not yet showing the wizard
040: * @see #showPage
041: */
042: public IWizardPage getCurrentPage();
043:
044: /**
045: * Returns the shell for this wizard container.
046: *
047: * @return the shell, or <code>null</code> if this wizard
048: * container does not have a shell
049: */
050: public Shell getShell();
051:
052: /**
053: * Makes the given page visible.
054: * <p>
055: * This method should not be use for normal page
056: * sequencing (back, next) which is handled by the
057: * container itself. It may, however, be used to
058: * move to another page in response to some custom
059: * action such as double clicking in a list.
060: * </p>
061: *
062: * @param page the page to show
063: * @see #getCurrentPage
064: */
065: public void showPage(IWizardPage page);
066:
067: /**
068: * Adjusts the enable state of the Back, Next, and Finish
069: * buttons to reflect the state of the currently active
070: * page in this container.
071: * <p>
072: * This method is called by the container itself
073: * when its wizard page changes and may be called
074: * by the page at other times to force a button state
075: * update.
076: * </p>
077: */
078: public void updateButtons();
079:
080: /**
081: * Updates the message (or error message) shown in the message line to
082: * reflect the state of the currently active page in this container.
083: * <p>
084: * This method is called by the container itself
085: * when its wizard page changes and may be called
086: * by the page at other times to force a message
087: * update.
088: * </p>
089: */
090: public void updateMessage();
091:
092: /**
093: * Updates the title bar (title, description, and image) to
094: * reflect the state of the currently active page in this container.
095: * <p>
096: * This method is called by the container itself
097: * when its wizard page changes and may be called
098: * by the page at other times to force a title bar
099: * update.
100: * </p>
101: */
102: public void updateTitleBar();
103:
104: /**
105: * Updates the window title to reflect the state of the current wizard.
106: * <p>
107: * This method is called by the container itself
108: * when its wizard changes and may be called
109: * by the wizard at other times to force a window
110: * title change.
111: * </p>
112: */
113: public void updateWindowTitle();
114: }
|