|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.javaprog.ui.wizard.AbstractStep
public abstract class AbstractStep
Provides a basic Step implementation. This class manages the PropertyChangeListeners and the caching of the step component.
Field Summary | |
---|---|
protected boolean |
canCancel
|
protected boolean |
canFinish
|
protected boolean |
canGoBack
|
protected boolean |
canGoNext
|
protected JComponent |
component
The component displayed in the wizard dialog. |
protected String |
description
The description displayed by the step description renderer. |
protected EventListenerList |
listenerList
Manages the listeners registered with this step. |
protected String |
name
The name displayed in the step list. |
Fields inherited from interface net.javaprog.ui.wizard.Step |
---|
BACK_PROPERTY, CANCEL_PROPERTY, FINISH_PROPERTY, NEXT_PROPERTY |
Constructor Summary | |
---|---|
AbstractStep(String name,
String description)
Creates a new Step with the given name and description. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Adds a listener for the back, next and finish properties. |
boolean |
canCancel()
Returns whether the cancel action is enabled. |
boolean |
canFinish()
Returns whether the finish action is enabled. |
boolean |
canGoBack()
Returns whether the back action is enabled. |
boolean |
canGoNext()
Returns whether the next action is enabled. |
protected abstract JComponent |
createComponent()
Subclasses must overwrite this method and return the step's component. |
protected void |
firePropertyChange(String prop,
Object oldValue,
Object newValue)
Notifies the listeners of a property change. |
JComponent |
getComponent()
Returns the step's component. |
String |
getDescription()
Returns a descriptive string for this step that might be displayed in the StepDescriptionRenderer. |
String |
getName()
Returns the step's name that might be displayed in the StepDescriptionRenderer and in the StepListRenderer. |
void |
removePropertyChangeListener(PropertyChangeListener l)
Removes a previously added listener. |
protected void |
setCanCancel(boolean b)
Changes the canCancel property and notifies the listeners. |
protected void |
setCanFinish(boolean b)
Changes the canFinish property and notifies the listeners. |
protected void |
setCanGoBack(boolean b)
Changes the canGoBack property and notifies the listeners. |
protected void |
setCanGoNext(boolean b)
Changes the canGoNext property and notifies the listeners. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.javaprog.ui.wizard.Step |
---|
prepareRendering |
Field Detail |
---|
protected boolean canGoBack
protected boolean canGoNext
protected boolean canFinish
protected boolean canCancel
protected String name
getName()
protected String description
getDescription()
protected JComponent component
getComponent()
protected final EventListenerList listenerList
addPropertyChangeListener(PropertyChangeListener)
,
removePropertyChangeListener(PropertyChangeListener)
Constructor Detail |
---|
public AbstractStep(String name, String description)
Method Detail |
---|
public void addPropertyChangeListener(PropertyChangeListener l)
Step
addPropertyChangeListener
in interface Step
Step.removePropertyChangeListener(PropertyChangeListener)
public void removePropertyChangeListener(PropertyChangeListener l)
Step
removePropertyChangeListener
in interface Step
Step.addPropertyChangeListener(PropertyChangeListener)
public String getDescription()
Step
getDescription
in interface Step
public String getName()
Step
getName
in interface Step
public JComponent getComponent()
getComponent
in interface Step
createComponent()
protected abstract JComponent createComponent()
JComponent.setOpaque(boolean)
,
getComponent()
public boolean canGoBack()
Step
canGoBack
in interface Step
protected void setCanGoBack(boolean b)
b
- whether the back button should be enabled or notcanGoBack
public boolean canGoNext()
Step
canGoNext
in interface Step
protected void setCanGoNext(boolean b)
b
- whether the next button should be enabled or notcanGoNext
public boolean canFinish()
Step
canFinish
in interface Step
protected void setCanFinish(boolean b)
b
- whether the finish button should be enabled or notcanFinish
public boolean canCancel()
Step
canCancel
in interface Step
protected void setCanCancel(boolean b)
b
- whether the wizard should be cancelable or notcanCancel
protected void firePropertyChange(String prop, Object oldValue, Object newValue)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |