KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > rcp > wizard > IDynamicPathWizard


1 /*
2  * Created on Jun 5, 2005
3  */

4 package com.nightlabs.rcp.wizard;
5
6 import org.eclipse.jface.wizard.IWizard;
7 import org.eclipse.jface.wizard.IWizardPage;
8
9 /**
10  * @author Marco Schulze - marco at nightlabs dot de
11  */

12 public interface IDynamicPathWizard extends IWizard
13 {
14     /**
15      * <strong>Important API change:</strong> Since this method exists, you
16      * MUST NOT overwrite {@link #getWizardEntryPage()} anymore!!!
17      * <p>
18      * This method is called exactly once and you should create the first page of
19      * your wizard here. Note, that it is already called in the constructor
20      * if <tt>init</tt> is <tt>true</tt>.
21      * <p>
22      * Note: You might want to extend the {@link DynamicPathWizardPage} instead of manually
23      * implementing an {@link IDynamicPathWizardPage}.
24      *
25      * @return Returns the first page of the wizard.
26      *
27      * @see DynamicPathWizardPage
28      * @see IDynamicPathWizardPage
29      */

30     IDynamicPathWizardPage createWizardEntryPage();
31
32     /**
33      * <strong>Important API change: Do not overwrite this method anymore!!!</strong>
34      * Overwrite {@link #createWizardEntryPage()} instead!
35      *
36      * @return Returns the first page of the wizard. If this page does not yet exist
37      * (means it's the first call to this method), {@link #createWizardEntryPage()} is
38      * called.
39      */

40     IDynamicPathWizardPage getWizardEntryPage();
41
42     /**
43      * With this method you can insert a page. Once the wizard is visible, you
44      * can only add pages in the path AFTER the current page!
45      *
46      * @param index The 0-based position of the page.
47      * @param page The page to be added.
48      */

49     void addDynamicWizardPage(int index, IDynamicPathWizardPage page);
50
51     /**
52      * This method adds a page to the end of the dynamic path.
53      *
54      * @param page The page to be added.
55      */

56     void addDynamicWizardPage(IDynamicPathWizardPage page);
57
58     /**
59      * @param page The page for which to find out the index.
60      * @return Either -1, if the page is not in the <tt>List</tt>, or the 0-based
61      * index within the <tt>List</tt>.
62      */

63     int getDynamicWizardPageIndex(IDynamicPathWizardPage page);
64
65     /**
66      * @param index The 0-based index of the desired page.
67      * @return Returns always an instance of <tt>IDynamicPathWizardPage</tt>.
68      * If the index is invalid, the used <tt>List</tt> throws an exception.
69      */

70     IDynamicPathWizardPage getDynamicWizardPage(int index);
71
72     int getDynamicWizardPageCount();
73
74     /**
75      * Removes the page with the given index. If the index is invalid, nothing
76      * happens. Note, that (if the wizard is already visible) you can only remove
77      * a page that appears AFTER the
78      * current page - means NOT being in the
79      * path from the entry-page to the current page.
80      *
81      * @param index Index of the dynamic page.
82      */

83     void removeDynamicWizardPage(int index);
84
85     /**
86      * Removes the given page. If the page is unknown, nothing
87      * happens. Note, that (if the wizard is already visible) you can only remove
88      * a page that appears AFTER the
89      * current page - means NOT being in the path from the entry-page to the
90      * current page.
91      *
92      * @param page The page to be removed from this wizard.
93      */

94     void removeDynamicWizardPage(IDynamicPathWizardPage page);
95
96     void removeAllDynamicWizardPages();
97
98     DynamicWizardPopulator getPopulator();
99
100     void setPopulator(DynamicWizardPopulator populator);
101
102     DynamicPathWizardDialog getDynamicWizardDialog();
103
104     void setDynamicWizardDialog(DynamicPathWizardDialog dynamicWizardDialog);
105
106     IWizardPage getNextPage(IWizardPage page);
107
108     void updateDialog();
109
110 }
Popular Tags