blob: ac6ec3c298943ef0a45159911c8e85a198efb530 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.gui;
/**
* The <tt>WizardPage</tt> represents a page in a <tt>WizardContainer</tt>.
* A page has a unique identifier. Each page should specify the identifier
* of both next and previous page to be displayed when user clicks "Next"
* or "Back" wizard button. These identifiers will be used from the
* <tt>WizardContainer</tt> to determine, which page should be displayed
* when the "Next" wizard button is clicked and which when "Back" is clicked.
* <p>
* In the construction of an account registration wizard container the UI
* Service implementation could implement this interface to define
* a Default wizard page and a Summary page. Each
* <tt>AccountRegistrationWizard</tt> could obtain the identifier of both
* Default and Summary page from the corresponding
* <tt>AccountRegistrationWizardContainer</tt>, where it is added.
* <p>
* The predefined FINISH_PAGE_IDENTIFIER should be used to mark the end of
* a wizard.
*
* @author Yana Stamcheva
*/
public interface WizardPage
{
/**
* The identifier of the last wizard page.
*/
String FINISH_PAGE_IDENTIFIER = "FINISH";
/**
* The identifier of the summary wizard page.
*/
String SUMMARY_PAGE_IDENTIFIER = "SUMMARY";
/**
* The identifier of the default wizard page.
*/
String DEFAULT_PAGE_IDENTIFIER = "DEFAULT";
/**
* Returns the identifier of this <tt>WizardPage</tt>.
*
* @return the identifier of this <tt>WizardPage</tt>
*/
public Object getIdentifier();
/**
* Returns the identifier of the next wizard page. Meant to be used by
* the <tt>WizardContainer</tt> to determine which is the next page to
* display when user clicks on the "Next" wizard button.<p>
* When this instance corresponds to the last page of the wizard this
* method should return <tt>WizardPage.FINISH_PAGE_IDENTIFIER</tt>
*
* @return the identifier of the next wizard page
*/
public Object getNextPageIdentifier();
/**
* Returns the identifier of the previous wizard page. Meant to be used by
* the <tt>WizardContainer</tt> to determine which is the page to display
* when user clicks on the "Back" wizard button.
*
* @return the identifier of the prevoious wizard page
*/
public Object getBackPageIdentifier();
/**
* Returns the user interface form represented by this page. The form should
* be developed by using a library that is supported from current UI Service
* implementation. For example if the current UI Service implementation is
* made usind Java Swing, this method should return a java.awt.Component to
* be added properly in the <tt>WizardContainer</tt> implemented in UI
* Service implementation.
*
* @return the user interface form represented by this page
*/
public Object getWizardForm();
/**
* Invoked when this <tt>WizardPage</tt> will be hidden eighter because
* the user has clicked "Back" or "Next". This method should be invoked
* from the <tt>WizardContainer</tt> implementation just before this page
* is hidden when replacing it with the previous or the next one.
* <p>
* You should add here all operations you need to be executed when this
* <tt>WizardPage</tt> is about to be hidden.
*/
public void pageHiding();
/**
* Invoked when this <tt>WizardPage</tt> is shown to the user and has
* become the current wizard page. This method should be invoked from the
* <tt>WizardContainer</tt> implementation just after this page is shown
* to the user.
* <p>
* You should add here all operations you need to be executed when this
* <tt>WizardPage</tt> is shown.
*/
public void pageShown();
/**
* Invoked when this <tt>WizardPage</tt> will be shown eighter because
* the user has clicked "Back" on the next wizard page or "Next" on the
* previous one. This method should be invoked from the
* <tt>WizardContainer</tt> implementation just before this page
* is shown to the user.
* <p>
* You should add here all operations you need to be executed when this
* <tt>WizardPage</tt> is about to be shown.
*/
public void pageShowing();
/**
* Invoked when user clicks on the "Next" wizard button. You should add
* here all operations you need to be executed when user clicks "Next" on
* this <tt>WizardPage</tt>.
*/
public void commitPage();
/**
* Invoked when user clicks on the "Back" wizard button. You should add
* here all operations you need to be executed when user clicks "Back" on
* this <tt>WizardPage</tt>.
*/
public void pageBack();
}
|