|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.izforge.izpack.installer.panel.AbstractPanelView<T>
public abstract class AbstractPanelView<T>
Encapsulates a Panel and its user-interface representation.
| Constructor Summary | |
|---|---|
AbstractPanelView(Panel panel,
Class<T> viewClass,
ObjectFactory factory,
InstallData installData)
Constructs a PanelView. |
|
| Method Summary | |
|---|---|
boolean |
canShow()
Determines if the panel can be shown. |
IXMLElement |
createPanelRootRecord()
Creates an empty root element prepared for adding auto-installation records for this panel. |
protected T |
createView(Panel panel,
Class<T> viewClass)
Creates a new view. |
void |
executePostValidationActions()
Executes actions after validating the panel. |
void |
executePreActivationActions()
Executes actions prior to activating the panel. |
void |
executePreValidationActions()
Executes actions prior to validating the panel. |
protected ObjectFactory |
getFactory()
Returns the factory. |
protected abstract AbstractUIHandler |
getHandler()
Returns a handler to prompt the user. |
int |
getIndex()
Returns the panel index. |
protected String |
getMessage(String id)
Helper to return a localised message, given its id. |
Panel |
getPanel()
Returns the panel. |
String |
getPanelId()
Returns the panel identifier. |
T |
getView()
Returns the panel user interface. |
protected void |
initialise(T view,
Panel panel,
InstallData installData)
Initialises the view. |
boolean |
isValid()
Determines if the panel is valid. |
boolean |
isValid(boolean refreshVariables)
Determines if the panel is valid. |
boolean |
isVisible()
Determines the visibility of the panel. |
protected boolean |
isWarningValid(String message,
boolean defaultAnswer)
Determines the behaviour when a warning is encountered during validation. |
void |
saveData()
Save the contents of the panel into install data. |
void |
setIndex(int index)
Sets the panel index. |
void |
setVisible(boolean visible)
Sets the visibility of the panel. |
protected boolean |
validateData()
Evaluates the panel data validator. |
protected boolean |
validateDynamicConditions()
Validates dynamic conditions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.izforge.izpack.installer.panel.PanelView |
|---|
createInstallationRecord |
| Constructor Detail |
|---|
public AbstractPanelView(Panel panel,
Class<T> viewClass,
ObjectFactory factory,
InstallData installData)
PanelView.
panel - the panelviewClass - the panel user interface classfactory - the factory for creating the viewinstallData - the installation data| Method Detail |
|---|
public String getPanelId()
getPanelId in interface PanelView<T>public Panel getPanel()
getPanel in interface PanelView<T>public int getIndex()
getIndex in interface PanelView<T>public void setIndex(int index)
setIndex in interface PanelView<T>index - the indexpublic T getView()
DataValidator specified, this will be constructed, with both the panel and view
supplied for injection into it's constructor.
getView in interface PanelView<T>public void setVisible(boolean visible)
setVisible in interface PanelView<T>visible - if true the panel is visible, otherwise it is hiddenpublic boolean isVisible()
isVisible in interface PanelView<T>true if the panel is visible, false if it is hiddenpublic boolean isValid()
isValid in interface PanelView<T>true if the panel is validpublic boolean isValid(boolean refreshVariables)
isValid in interface PanelView<T>refreshVariables - whether to refresh dynamic variables before validating
true if the panel is validpublic void saveData()
saveData in interface PanelView<T>public boolean canShow()
canShow in interface PanelView<T>true if the panel can be shownpublic void executePreActivationActions()
public void executePreValidationActions()
public void executePostValidationActions()
protected abstract AbstractUIHandler getHandler()
protected T createView(Panel panel,
Class<T> viewClass)
panel - the panel to create the view forviewClass - the view base class
protected void initialise(T view,
Panel panel,
InstallData installData)
view - the view to initialisepanel - the panel the view representsinstallData - the installation dataprotected boolean validateDynamicConditions()
true if there are no conditions, or conditions validate successfullyprotected boolean validateData()
true if the validator evaluated successfully, or with a warning that the user chose to skip;
otherwise false
protected boolean isWarningValid(String message,
boolean defaultAnswer)
message - the validation message. May be nulldefaultAnswer - the default response for warnings
true if the warning doesn't invalidate the panel; false if it doesprotected ObjectFactory getFactory()
protected String getMessage(String id)
id - the message identifier
null if none is foundpublic final IXMLElement createPanelRootRecord()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||