|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.bebop.Completable
com.arsdigita.bebop.SimpleComponent
com.arsdigita.bebop.TextStylable
com.arsdigita.bebop.BlockStylable
com.arsdigita.bebop.SimpleContainer
com.arsdigita.bebop.SplitPanel
com.arsdigita.bebop.SplitWizard
com.arsdigita.bebop.MapWizard
A SplitWizard
that can be used to implement the
classic, static wizard.
The wizard is little more than a Map from labels to components. The selector for the wizard shows all the available steps, and when the user clicks a step, the corresponding component appears on the right.
In addition, the wizard maintains a "progress step" state parameter. All steps above the progress step will be disabled, until the setProgress(PageState state, int progress) method is called. Thus, the users are forced to proceed through the wizard in a linear fashion.
The wizard does not provide the "Next" and "Previous" buttons. However, it does provide the stepForward(PageState state) and stepBack(PageState state) methods.
In addition, the wizard overrides the default pane behavior. If no step is selected, the wizard automatically selects the default step. The default step may be changed with
Nested Class Summary |
Nested classes inherited from class com.arsdigita.bebop.SplitWizard |
SplitWizard.HeaderPanel |
Field Summary | |
static String |
CURRENT_STEP
The name of the state parameter which stores the current selection |
static String |
PROGRESS
The name of the state parameter which stores the progress |
static String |
versionId
|
Fields inherited from class com.arsdigita.bebop.SplitPanel |
BORDER |
Fields inherited from class com.arsdigita.bebop.BlockStylable |
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CENTER, FULL_WIDTH, INSERT, LEFT, MIDDLE, RIGHT, TEXTTOP, TOP |
Fields inherited from class com.arsdigita.bebop.SimpleComponent |
m_attr |
Fields inherited from interface com.arsdigita.bebop.Component |
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE |
Constructor Summary | |
MapWizard(String header)
Construct a new, empty MapWizard |
|
MapWizard(String header,
String listLabel)
Construct a new, empty MapWizard |
Method Summary | |
void |
add(Component c)
Adds a component to this container. |
void |
add(Component c,
int constraints)
Adds a component to this container. |
void |
add(String key,
String label,
Component c)
Add a panel to the wizard |
void |
add(String key,
String label,
String caption,
Component c)
Add a panel to the wizard |
int |
getCurrentStep(PageState state)
Get the index which identifies the current step. |
String |
getCurrentStepKey(PageState state)
Get the key which identifies the current step. |
int |
getDefaultProgress()
Get the default progress. |
String |
getDefaultStepKey()
|
protected SequentialMap |
getLabelsMap()
|
List |
getList()
|
Label |
getListLabel()
|
protected SequentialMap |
getPanelsMap()
|
int |
getProgress(PageState state)
Get the current progress |
int |
getStepCount()
|
String |
getStepKey(int i)
|
void |
register(Page p)
Register the "progress" parameter |
void |
setCurrentStep(PageState state,
int step)
Select the step with the specified index. |
void |
setCurrentStepKey(PageState state,
String key)
Select the step with the specified key. |
void |
setDefaultProgress(int index)
Set the default progress. |
void |
setDefaultStepKey(String key)
Set the key of the default step. |
void |
setProgress(PageState state,
int p)
Set the current progress |
void |
stepBack(PageState state)
Move to the previous step. |
void |
stepForward(PageState state)
Move to the next step. |
void |
stepForward(PageState state,
boolean force)
Move to the next step and possibly force the progress so that we can do it. |
Methods inherited from class com.arsdigita.bebop.SplitWizard |
getDefaultPane, getSelectionModel, getSelector, setDefaultPane, setSelectionModel, setSelector |
Methods inherited from class com.arsdigita.bebop.SplitPanel |
generateXML, getBorder, getDivider, getHeader, getLeftComponent, getRightComponent, lock, setBorder, setDivider, setHeader, setLeftComponent, setRightComponent |
Methods inherited from class com.arsdigita.bebop.SimpleContainer |
children, contains, generateChildrenXML, generateParent, get, getNamespace, getTag, indexOf, isEmpty, setNamespace, setTag, size |
Methods inherited from class com.arsdigita.bebop.BlockStylable |
setBorder, setBorder, setBorderColor, setHorizontalAlignment, setMargin, setMargin, setPadding, setPadding, setVerticalAlignment |
Methods inherited from class com.arsdigita.bebop.TextStylable |
setBackgroundColor, setColor |
Methods inherited from class com.arsdigita.bebop.SimpleComponent |
clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, register, respond, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible |
Methods inherited from class com.arsdigita.bebop.Completable |
addCompletionListener, fireCompletionEvent |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.arsdigita.bebop.Component |
getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, register, respond, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible |
Methods inherited from interface com.arsdigita.util.Lockable |
isLocked |
Field Detail |
public static final String versionId
public static final String CURRENT_STEP
public static final String PROGRESS
Constructor Detail |
public MapWizard(String header, String listLabel)
header
- The header which will be shown across the top
of the wizardlistLabel
- The label which will appear above the list of
stepspublic MapWizard(String header)
header
- The header which will be shown across the top
of the wizardMethod Detail |
public void register(Page p)
register
in interface Component
register
in class SimpleComponent
public void add(String key, String label, Component c)
key
- The unique key of the panellabel
- The label of the panel as it appears in the list on the leftc
- The component which will appear on the rightpublic void add(String key, String label, String caption, Component c)
key
- The unique key of the panellabel
- The label of the panel as it appears in the list on the leftcaption
- The caption which will appear above the componentc
- The component which will appear on the rightpublic final Label getListLabel()
public int getStepCount()
public final List getList()
public void add(Component c)
SimpleContainer
add
in interface Container
add
in class SimpleContainer
c
- the component to be addedpublic void add(Component c, int constraints)
SimpleContainer
add
in interface Container
add
in class SimpleContainer
constraints
- this parameter is ignored. Child classes should
override the add method if they wish to provide special handling
of constraints.public int getProgress(PageState state)
state
- The current page state
public void setProgress(PageState state, int p)
state
- The current page statep
- The index of the highest step to be enabled. All steps above
this index will be disabled. The index must be between -1 and
getStepCount() - 1, inclusive. -1 means that ALL steps are disabled.public void setDefaultProgress(int index)
index
- The default progresspublic int getDefaultProgress()
public void setDefaultStepKey(String key)
public String getDefaultStepKey()
public String getCurrentStepKey(PageState state)
state
- The current page state
public void setCurrentStepKey(PageState state, String key)
state
- The current page state
public int getCurrentStep(PageState state)
state
- The current page state
public void setCurrentStep(PageState state, int step)
state
- The current page state
public void stepForward(PageState state)
state
- The current page statepublic void stepForward(PageState state, boolean force)
Move to the next step and possibly force the progress so that we can do it.
state
- The current PageStateforce
- boolean that determines whether or not we force the
progress to increment if need be.public void stepBack(PageState state)
state
- The current page statepublic String getStepKey(int i)
i
- The numeric index of a step
protected final SequentialMap getLabelsMap()
SequentialMap
of labels for this wizardprotected final SequentialMap getPanelsMap()
SequentialMap
of components for this wizard
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |