|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.izforge.izpack.installer.panel.AbstractPanels<T,V>
public abstract class AbstractPanels<T extends AbstractPanelView<V>,V>
Abstract implementation of the PanelViews interface.
| Constructor Summary | |
|---|---|
AbstractPanels(List<T> panels,
InstallData installData)
Constructs an AbstractPanels. |
|
| Method Summary | |
|---|---|
protected boolean |
executeValidationActions(T panel,
boolean validate)
Executes any pre and post-validation actions for a panel. |
int |
getIndex()
Returns the current panel index. |
int |
getNext(boolean visibleOnly)
Determines if there is another panel after the current index. |
int |
getNext(int index,
boolean visibleOnly)
Determines if there is another panel after the specified index. |
Panel |
getPanel()
Returns the current panel. |
List<Panel> |
getPanels()
Returns the panels. |
T |
getPanelView()
Returns the current panel view. |
List<T> |
getPanelViews()
Returns the panel views. |
int |
getPrevious(boolean visibleOnly)
Determines if there is another panel prior to the specified index. |
int |
getPrevious(int index,
boolean visibleOnly)
Determines if there is another panel prior to the specified index. |
V |
getView()
Returns the current view. |
int |
getVisible()
Returns the number of visible panels. |
int |
getVisibleIndex(T panel)
Returns the index of a visible panel, relative to other visible panels. |
boolean |
hasNext()
Determines if there is another panel after the current panel. |
boolean |
hasPrevious()
Determines if there is panel prior to the current panel. |
boolean |
isValid()
Determines if the current panel is valid. |
boolean |
next()
Navigates to the next panel. |
boolean |
next(boolean validate)
Navigates to the next panel. |
boolean |
previous()
Navigates to the previous panel. |
boolean |
previous(int index)
Navigates to the panel before the specified index. |
boolean |
switchPanel(int newIndex,
boolean validate)
TODO: validate parameter not used - refactor this Switches panels. |
protected abstract boolean |
switchPanel(T newPanel,
T oldPanel)
Switches panels. |
void |
writeInstallationRecord(File file,
UninstallData uninstallData)
Writes an XML tree to a file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPanels(List<T> panels,
InstallData installData)
AbstractPanels.
panels - the panelsinstallData - | Method Detail |
|---|
public List<Panel> getPanels()
getPanels in interface Panelspublic Panel getPanel()
getPanel in interface Panelsnull if there is no current panelpublic List<T> getPanelViews()
getPanelViews in interface PanelViews<T extends AbstractPanelView<V>,V>public V getView()
getView in interface PanelViews<T extends AbstractPanelView<V>,V>null if there is nonepublic T getPanelView()
getPanelView in interface PanelViews<T extends AbstractPanelView<V>,V>null if there is nonepublic boolean isValid()
isValid in interface Panelstrue if the current panel is validpublic int getIndex()
getIndex in interface Panels-1 if there is no current panelpublic boolean hasNext()
hasNext in interface Panelstrue if there is another panelpublic boolean next()
next in interface Panelstrue if the next panel was navigated topublic boolean next(boolean validate)
next in interface Panelsvalidate - if true, only move to the next panel if validation succeeds
true if the next panel was navigated topublic boolean hasPrevious()
hasPrevious in interface Panelstrue if there is a panel prior to the current panelpublic boolean previous()
previous in interface Panelstrue if the previous panel was navigated topublic boolean previous(int index)
previous in interface Panelstrue if the previous panel was navigated to
public int getNext(int index,
boolean visibleOnly)
getNext in interface Panelsindex - the panel indexvisibleOnly - if true, only examine visible panels
true if there is another panelpublic int getNext(boolean visibleOnly)
getNext in interface PanelsvisibleOnly - if true, only examine visible panels
true if there is another panel
public int getPrevious(int index,
boolean visibleOnly)
getPrevious in interface Panelsindex - the panel indexvisibleOnly - if true, only examine visible panels
-1 if there are no more panelspublic int getPrevious(boolean visibleOnly)
getPrevious in interface PanelsvisibleOnly - if true, only examine visible panels
-1 if there are no more panelspublic int getVisibleIndex(T panel)
getVisibleIndex in interface PanelViews<T extends AbstractPanelView<V>,V>panel - the panel
-1 if the panel is not visiblepublic int getVisible()
getVisible in interface Panels
public void writeInstallationRecord(File file,
UninstallData uninstallData)
throws Exception
PanelViews
writeInstallationRecord in interface PanelViews<T extends AbstractPanelView<V>,V>file - file of where the auto-install will be placeduninstallData - used to ensure that the file will be removed by the uninstaller
Exception
public boolean switchPanel(int newIndex,
boolean validate)
newIndex - the index of the new panel
true if the switch was successful
protected abstract boolean switchPanel(T newPanel,
T oldPanel)
newPanel - the panel to switch tooldPanel - the panel to switch from, or null if there was no prior panel
true if the switch was successful
protected boolean executeValidationActions(T panel,
boolean validate)
panel - the panelvalidate - if true, validate the panel after executing the pre-validation actions
true if the panel is valid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||