01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jface.wizard;
11:
12: import org.eclipse.jface.dialogs.IDialogPage;
13:
14: /**
15: * Interface for a wizard page.
16: * <p>
17: * The class <code>WizardPage</code> provides an abstract implementation
18: * of this interface. However, clients are also free to implement this
19: * interface if <code>WizardPage</code> does not suit their needs.
20: * </p>
21: */
22: public interface IWizardPage extends IDialogPage {
23: /**
24: * Returns whether the next page could be displayed.
25: *
26: * @return <code>true</code> if the next page could be displayed,
27: * and <code>false</code> otherwise
28: */
29: public boolean canFlipToNextPage();
30:
31: /**
32: * Returns this page's name.
33: *
34: * @return the name of this page
35: */
36: public String getName();
37:
38: /**
39: * Returns the wizard page that would to be shown if the user was to
40: * press the Next button.
41: *
42: * @return the next wizard page, or <code>null</code> if none
43: */
44: public IWizardPage getNextPage();
45:
46: /**
47: * Returns the wizard page that would to be shown if the user was to
48: * press the Back button.
49: *
50: * @return the previous wizard page, or <code>null</code> if none
51: */
52: public IWizardPage getPreviousPage();
53:
54: /**
55: * Returns the wizard that hosts this wizard page.
56: *
57: * @return the wizard, or <code>null</code> if this page has not been
58: * added to any wizard
59: * @see #setWizard
60: */
61: public IWizard getWizard();
62:
63: /**
64: * Returns whether this page is complete or not.
65: * <p>
66: * This information is typically used by the wizard to decide
67: * when it is okay to finish.
68: * </p>
69: *
70: * @return <code>true</code> if this page is complete, and
71: * <code>false</code> otherwise
72: */
73: public boolean isPageComplete();
74:
75: /**
76: * Sets the wizard page that would typically be shown
77: * if the user was to press the Back button.
78: * <p>
79: * This method is called by the container.
80: * </p>
81: *
82: * @param page the previous wizard page
83: */
84: public void setPreviousPage(IWizardPage page);
85:
86: /**
87: * Sets the wizard that hosts this wizard page.
88: * Once established, a page's wizard cannot be changed
89: * to a different wizard.
90: *
91: * @param newWizard the wizard
92: * @see #getWizard
93: */
94: public void setWizard(IWizard newWizard);
95: }
|