35
|
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 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module dwtx.jface.wizard.IWizardPage;
|
|
14
|
|
15 import dwtx.jface.wizard.IWizard;
|
|
16
|
|
17 import dwtx.jface.dialogs.IDialogPage;
|
|
18
|
|
19 import dwt.dwthelper.utils;
|
|
20
|
|
21 /**
|
|
22 * Interface for a wizard page.
|
|
23 * <p>
|
|
24 * The class <code>WizardPage</code> provides an abstract implementation
|
|
25 * of this interface. However, clients are also free to implement this
|
|
26 * interface if <code>WizardPage</code> does not suit their needs.
|
|
27 * </p>
|
|
28 */
|
|
29 public interface IWizardPage : IDialogPage {
|
|
30 /**
|
|
31 * Returns whether the next page could be displayed.
|
|
32 *
|
|
33 * @return <code>true</code> if the next page could be displayed,
|
|
34 * and <code>false</code> otherwise
|
|
35 */
|
|
36 public bool canFlipToNextPage();
|
|
37
|
|
38 /**
|
|
39 * Returns this page's name.
|
|
40 *
|
|
41 * @return the name of this page
|
|
42 */
|
|
43 public String getName();
|
|
44
|
|
45 /**
|
|
46 * Returns the wizard page that would to be shown if the user was to
|
|
47 * press the Next button.
|
|
48 *
|
|
49 * @return the next wizard page, or <code>null</code> if none
|
|
50 */
|
|
51 public IWizardPage getNextPage();
|
|
52
|
|
53 /**
|
|
54 * Returns the wizard page that would to be shown if the user was to
|
|
55 * press the Back button.
|
|
56 *
|
|
57 * @return the previous wizard page, or <code>null</code> if none
|
|
58 */
|
|
59 public IWizardPage getPreviousPage();
|
|
60
|
|
61 /**
|
|
62 * Returns the wizard that hosts this wizard page.
|
|
63 *
|
|
64 * @return the wizard, or <code>null</code> if this page has not been
|
|
65 * added to any wizard
|
|
66 * @see #setWizard
|
|
67 */
|
|
68 public IWizard getWizard();
|
|
69
|
|
70 /**
|
|
71 * Returns whether this page is complete or not.
|
|
72 * <p>
|
|
73 * This information is typically used by the wizard to decide
|
|
74 * when it is okay to finish.
|
|
75 * </p>
|
|
76 *
|
|
77 * @return <code>true</code> if this page is complete, and
|
|
78 * <code>false</code> otherwise
|
|
79 */
|
|
80 public bool isPageComplete();
|
|
81
|
|
82 /**
|
|
83 * Sets the wizard page that would typically be shown
|
|
84 * if the user was to press the Back button.
|
|
85 * <p>
|
|
86 * This method is called by the container.
|
|
87 * </p>
|
|
88 *
|
|
89 * @param page the previous wizard page
|
|
90 */
|
|
91 public void setPreviousPage(IWizardPage page);
|
|
92
|
|
93 /**
|
|
94 * Sets the wizard that hosts this wizard page.
|
|
95 * Once established, a page's wizard cannot be changed
|
|
96 * to a different wizard.
|
|
97 *
|
|
98 * @param newWizard the wizard
|
|
99 * @see #getWizard
|
|
100 */
|
|
101 public void setWizard(IWizard newWizard);
|
|
102 }
|