Package docking.wizard
Class AbstractMagePanelManager<T>
- java.lang.Object
-
- docking.wizard.AbstractMagePanelManager<T>
-
- All Implemented Interfaces:
PanelManager
public abstract class AbstractMagePanelManager<T> extends java.lang.Object implements PanelManager
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractMagePanelManager(WizardState<T> initialState)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
cancel()
Method called when the user wants to cancel the process.boolean
canFinish()
Return true if the "finish" step can be completed.protected abstract java.util.Collection<? extends MagePanel<T>>
createPanels()
protected abstract void
doFinish()
void
finish()
Method called when the user wants to finish the process.protected MagePanel<T>
getCurrentPanel()
WizardPanel
getInitialPanel()
Get the first panel in the process.WizardPanel
getNextPanel()
Get the next panel in the process.protected java.util.List<MagePanel<T>>
getPanels()
java.awt.Dimension
getPanelSize()
Get the size of the panels.WizardPanel
getPreviousPanel()
Get the previous panel in the process.protected WizardState<T>
getState()
java.lang.String
getStatusMessage()
Get the status message for the current panel.WizardManager
getWizardManager()
Get the wizard manager.boolean
hasNextPanel()
Return true if there is a "next" panel.boolean
hasPreviousPanel()
Return true if there is a "previous" panel.void
initialize()
Set up the panel process.protected void
initializeHook()
protected void
setStatusMessage(java.lang.String msg)
void
setWizardManager(WizardManager wm)
Set the wizard manager for this panel manager.
-
-
-
Constructor Detail
-
AbstractMagePanelManager
protected AbstractMagePanelManager(WizardState<T> initialState)
-
-
Method Detail
-
getState
protected WizardState<T> getState()
-
cancel
public void cancel()
Description copied from interface:PanelManager
Method called when the user wants to cancel the process.- Specified by:
cancel
in interfacePanelManager
-
getWizardManager
public final WizardManager getWizardManager()
Description copied from interface:PanelManager
Get the wizard manager.- Specified by:
getWizardManager
in interfacePanelManager
- Returns:
- WizardManager wizard manager for this panel manager
-
setWizardManager
public final void setWizardManager(WizardManager wm)
Description copied from interface:PanelManager
Set the wizard manager for this panel manager.- Specified by:
setWizardManager
in interfacePanelManager
- Parameters:
wm
- wizard manager that calls the methods on this panel manager
-
getPanelSize
public java.awt.Dimension getPanelSize()
Description copied from interface:PanelManager
Get the size of the panels.- Specified by:
getPanelSize
in interfacePanelManager
- Returns:
- Dimension size of the panel
-
getStatusMessage
public final java.lang.String getStatusMessage()
Description copied from interface:PanelManager
Get the status message for the current panel.- Specified by:
getStatusMessage
in interfacePanelManager
- Returns:
- String message to display; may be null if there is no message that should be displayed
-
setStatusMessage
protected final void setStatusMessage(java.lang.String msg)
-
initializeHook
protected void initializeHook()
-
initialize
public final void initialize()
Description copied from interface:PanelManager
Set up the panel process.- Specified by:
initialize
in interfacePanelManager
-
hasNextPanel
public final boolean hasNextPanel()
Description copied from interface:PanelManager
Return true if there is a "next" panel.- Specified by:
hasNextPanel
in interfacePanelManager
- Returns:
- boolean true means there is a next panel to display
-
hasPreviousPanel
public final boolean hasPreviousPanel()
Description copied from interface:PanelManager
Return true if there is a "previous" panel.- Specified by:
hasPreviousPanel
in interfacePanelManager
- Returns:
- boolean true means there is a previous panel to display
-
canFinish
public final boolean canFinish()
Description copied from interface:PanelManager
Return true if the "finish" step can be completed.- Specified by:
canFinish
in interfacePanelManager
- Returns:
- boolean true if ok to finish
-
getNextPanel
public final WizardPanel getNextPanel() throws IllegalPanelStateException
Description copied from interface:PanelManager
Get the next panel in the process.- Specified by:
getNextPanel
in interfacePanelManager
- Returns:
- WizardPanel the next panel
- Throws:
IllegalPanelStateException
- if an IOException or other unexpected error occurs
-
getInitialPanel
public WizardPanel getInitialPanel() throws IllegalPanelStateException
Description copied from interface:PanelManager
Get the first panel in the process.- Specified by:
getInitialPanel
in interfacePanelManager
- Returns:
- WizardPanel the first panel
- Throws:
IllegalPanelStateException
- if an IOException or other unexpected error occurs
-
getPreviousPanel
public final WizardPanel getPreviousPanel() throws IllegalPanelStateException
Description copied from interface:PanelManager
Get the previous panel in the process.- Specified by:
getPreviousPanel
in interfacePanelManager
- Returns:
- WizardPanel the previous panel
- Throws:
IllegalPanelStateException
- if an IOException or other unexpected error occurs
-
doFinish
protected abstract void doFinish() throws IllegalPanelStateException
- Throws:
IllegalPanelStateException
-
finish
public final void finish() throws IllegalPanelStateException
Description copied from interface:PanelManager
Method called when the user wants to finish the process.- Specified by:
finish
in interfacePanelManager
- Throws:
IllegalPanelStateException
- if an IOException or other unexpected error occurs
-
-