KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > wizard > IWizardContainer


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jface.wizard;
12
13 import org.eclipse.jface.operation.IRunnableContext;
14 import org.eclipse.swt.widgets.Shell;
15
16 /**
17  * Interface for containers that can host a wizard. It displays
18  * wizard pages, at most one of which is considered
19  * the current page. <code>getCurrentPage</code> returns the
20  * current page; <code>showPage</code> programmatically changes the
21  * the current page. Note that the pages need not all belong
22  * to the same wizard.
23  * <p>
24  * The class <code>WizardDialog</code> provides a fully functional
25  * implementation of this interface which will meet the needs of
26  * most clients. However, clients are also free to implement this
27  * interface if <code>WizardDialog</code> does not suit their needs.
28  * </p>
29  * <p>
30  * Implementors are responsible for disposing of their wizards.
31  * </p>
32  *
33  * @see org.eclipse.jface.wizard.IWizardContainer2
34  */

35 public interface IWizardContainer extends IRunnableContext {
36     /**
37      * Returns the current wizard page for this container.
38      *
39      * @return the current wizard page, or <code>null</code> if the container
40      * is not yet showing the wizard
41      * @see #showPage
42      */

43     public IWizardPage getCurrentPage();
44
45     /**
46      * Returns the shell for this wizard container.
47      *
48      * @return the shell, or <code>null</code> if this wizard
49      * container does not have a shell
50      */

51     public Shell getShell();
52
53     /**
54      * Makes the given page visible.
55      * <p>
56      * This method should not be use for normal page
57      * sequencing (back, next) which is handled by the
58      * container itself. It may, however, be used to
59      * move to another page in response to some custom
60      * action such as double clicking in a list.
61      * </p>
62      *
63      * @param page the page to show
64      * @see #getCurrentPage
65      */

66     public void showPage(IWizardPage page);
67
68     /**
69      * Adjusts the enable state of the Back, Next, and Finish
70      * buttons to reflect the state of the currently active
71      * page in this container.
72      * <p>
73      * This method is called by the container itself
74      * when its wizard page changes and may be called
75      * by the page at other times to force a button state
76      * update.
77      * </p>
78      */

79     public void updateButtons();
80
81     /**
82      * Updates the message (or error message) shown in the message line to
83      * reflect the state of the currently active page in this container.
84      * <p>
85      * This method is called by the container itself
86      * when its wizard page changes and may be called
87      * by the page at other times to force a message
88      * update.
89      * </p>
90      */

91     public void updateMessage();
92
93     /**
94      * Updates the title bar (title, description, and image) to
95      * reflect the state of the currently active page in this container.
96      * <p>
97      * This method is called by the container itself
98      * when its wizard page changes and may be called
99      * by the page at other times to force a title bar
100      * update.
101      * </p>
102      */

103     public void updateTitleBar();
104
105     /**
106      * Updates the window title to reflect the state of the current wizard.
107      * <p>
108      * This method is called by the container itself
109      * when its wizard changes and may be called
110      * by the wizard at other times to force a window
111      * title change.
112      * </p>
113      */

114     public void updateWindowTitle();
115 }
116
Popular Tags