com.izforge.izpack.panels
Class ValidatePackSelections

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.izforge.izpack.installer.IzPanel
                      extended bycom.izforge.izpack.panels.ValidatePackSelections
All Implemented Interfaces:
com.izforge.izpack.util.AbstractUIHandler, Accessible, ImageObserver, MenuContainer, Serializable

public class ValidatePackSelections
extends com.izforge.izpack.installer.IzPanel

See Also:
Serialized Form

Nested Class Summary
protected  class ValidatePackSelections.SearchField
          This class encapsulates a lot of search field functionality.
protected static class ValidatePackSelections.TextValuePair
          This class can be used to associate a text string and a (text) value.
 
Nested classes inherited from class com.izforge.izpack.installer.IzPanel
com.izforge.izpack.installer.IzPanel.Filler
 
Nested classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected static String ALIGNMENT
           
protected static String AUTO_INSTALL
           
protected static String BOLD
           
protected  Vector buttonGroups
          Holds the references to all radio button groups
protected static String CENTER
           
protected static String CHECK_FIELD
           
protected static String CLASS
           
protected static String COMBO_CHOICE
           
protected static String COMBO_FIELD
           
protected static String COMBO_VALUE
           
protected static String DEPENDS
           
protected static String DESCRIPTION
           
protected static String DIVIDER_FIELD
           
protected static String EXCLUSIVE
           
protected static boolean fAdvancedMode
           
protected static String FALSE
           
protected static String FAMILY
           
protected static boolean fHasSetAdvancedMode
          Constructs a UserInputPanel.
protected static String FIELD_LABEL
           
protected static String FIELD_NODE_ID
           
protected  boolean fInitComplete
           
protected static boolean fStaticInitComplete
           
protected  GeronimoConfigProcessor gcp
           
protected  boolean haveSpec
           
protected static String INSTANCE_IDENTIFIER
           
protected static int instanceCount
           
protected  int instanceNumber
           
protected static String ITALICS
           
protected static String KEY
           
protected static String LANG_FILE_NAME
           
protected  com.izforge.izpack.LocaleDatabase langpack
           
protected  com.izforge.izpack.gui.TwoColumnLayout layout
          Holds all user inputs for use in automated installation
protected static String LEFT
           
protected static String NAME
           
protected static String NODE_ID
          how the spec node for a specific panel is identified
protected static String OS
           
protected static String PACKS_PANEL
           
protected  boolean packsDefined
          If there is a possibility that some UI elements will not get added we can not allow to go back to the PacksPanel, because the process of building the UI is not reversable.
protected static String PANEL_PKG
           
protected  com.izforge.izpack.installer.InstallerFrame parentFrame
           
protected  Vector passwordGroups
          Holds the references to all password field groups
protected  Vector passwordGroupsRead
          used for temporary storage of references to password groups that have already been read in a given read cycle.
protected static int POS_CONSTRAINTS
           
protected static int POS_DISPLAYED
           
protected static int POS_FALSE
           
protected static int POS_FIELD
           
protected static int POS_GROUP
           
protected static int POS_MESSAGE
           
protected static int POS_OS
           
protected static int POS_PACKS
           
protected static int POS_SUPPRESS
           
protected static int POS_TRUE
           
protected static int POS_TYPE
           
protected static int POS_VARIABLE
           
protected static String PROCESSOR
           
protected static String PWD_FIELD
           
protected static String PWD_INPUT
           
protected static String PWD_SIZE
           
protected static String RADIO_CHOICE
           
protected static String RADIO_FIELD
           
protected static String RADIO_VALUE
           
protected static String RIGHT
           
protected static String RULE_DISPLAY_FORMAT
           
protected static String RULE_ENCRYPTED
           
protected static String RULE_FIELD
           
protected static String RULE_LAYOUT
           
protected static String RULE_PARAM
           
protected static String RULE_PARAM_NAME
           
protected static String RULE_PARAM_VALUE
           
protected static String RULE_PLAIN_STRING
           
protected static String RULE_RESULT_FORMAT
           
protected static String RULE_SEPARATOR
           
protected static String RULE_SPECIAL_SEPARATOR
           
protected static String SEARCH_BUTTON_FIELD
           
protected static String SEARCH_CHECKFILENAME
           
protected static String SEARCH_CHOICE
           
protected static String SEARCH_DIRECTORY
           
protected static String SEARCH_FIELD
           
protected static String SEARCH_FILE
           
protected static String SEARCH_FILENAME
           
protected static String SEARCH_PARENTDIR
           
protected static String SEARCH_RESULT
           
protected static String SEARCH_TYPE
           
protected static String SEARCH_VALUE
           
protected  Vector searchFields
          Used to track search fields.
protected static String SELECTED_PACKS
           
protected static String SELECTEDPACKS
           
protected static String SET
           
protected static String SIZE
           
protected static String SPACE_FIELD
           
protected  net.n3.nanoxml.XMLElement spec
          The parsed result from reading the XML specification from the file
protected static String SPEC
           
protected static String SPEC_FILE_NAME
          The name of the XML file that specifies the panel layout
protected static String STATIC_TEXT
           
protected  String sTitle
           
protected static String SUPPRESS
           
protected static String TEXT
           
protected static String TEXT_FIELD
           
protected static String TEXT_SIZE
           
protected static String TITLE_FIELD
           
protected static String TOP
           
protected static String TRUE
           
protected static String TYPE
           
protected  Vector uiElements
          Holds the references to all of the UI elements
protected static String UNSELECTEDPACKS
           
protected static String VALIDATOR
           
protected static String VALUE
           
protected static String VARIABLE
           
protected static HashMap varMap
           
protected static String WHEN
           
 
Fields inherited from class com.izforge.izpack.installer.IzPanel
COLS_1, d, D, defaultGridBagConstraints, gridBagLayoutStarted, gridxCounter, gridyCounter, headline, HEADLINE, headLineLabel, idata, initialFocus, izPanelLayout, myClassname, myFullClassname, myPrefix, parent, ROWS_1, X_ORIGIN, Y_ORIGIN
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface com.izforge.izpack.util.AbstractUIHandler
ANSWER_CANCEL, ANSWER_NO, ANSWER_YES, CHOICES_YES_NO, CHOICES_YES_NO_CANCEL
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ValidatePackSelections(com.izforge.izpack.installer.InstallerFrame parent, com.izforge.izpack.installer.InstallData installData)
           
 
Method Summary
protected  void addCheckBox(net.n3.nanoxml.XMLElement spec)
          Adds a chackbox to the list of UI elements.
protected  void addComboBox(net.n3.nanoxml.XMLElement spec)
          Adds a combo box to the list of UI elements.
protected  void addDescription(net.n3.nanoxml.XMLElement spec, Vector forPacks, Vector forOs, Vector suppress)
          Adds a description to the list of UI elements.
protected  void addDivider(net.n3.nanoxml.XMLElement spec)
          Adds a dividing line to the list of UI elements act as separator.
protected  void addPasswordField(net.n3.nanoxml.XMLElement spec)
          Adds one or more password fields to the list of UI elements.
protected  void addRadioButton(net.n3.nanoxml.XMLElement spec)
          Adds a radio button set to the list of UI elements.
protected  void addRuleField(net.n3.nanoxml.XMLElement spec)
          Adds a rule field to the list of UI elements.
protected  void addSearch(net.n3.nanoxml.XMLElement spec)
          Adds a search field to the list of UI elements.
protected  void addSpace(net.n3.nanoxml.XMLElement spec)
          Adds a dummy field to the list of UI elements to act as spacer.
protected  void addText(net.n3.nanoxml.XMLElement spec)
          Adds text to the list of UI elements
protected  void addTextField(net.n3.nanoxml.XMLElement spec)
          Adds a text field to the list of UI elements
protected  void addTitle(net.n3.nanoxml.XMLElement spec)
          Adds the title to the panel.
protected  void buildUI()
          Builds the UI and makes it ready for display
protected  int getAlignment(net.n3.nanoxml.XMLElement element)
          Retreives the alignment setting for the XMLElement.
protected  boolean getBoolean(net.n3.nanoxml.XMLElement element, String attribute, boolean defaultValue)
          Retrieves the value of a boolean attribute.
protected  Vector getFieldSuppressionList(net.n3.nanoxml.XMLElement spec)
           
protected  float getFloat(net.n3.nanoxml.XMLElement element, String attribute, float defaultValue)
          Retrieves the value of a floating point attribute.
protected  String getText(net.n3.nanoxml.XMLElement element)
          Extracts the text from an XMLElement.
protected  String getTitle()
           
protected  Vector getUiElements()
          Returns the uiElements.
protected  boolean isFieldSuppressed(Vector suppressions)
           
 boolean isValidated()
          Indicates wether the panel has been validated or not.
protected  boolean itemRequiredFor(Vector packs)
          Verifies if an item is required for any of the packs listed.
 boolean itemRequiredForOs(Vector os)
          Verifies if an item is required for the operating system the installer executed.
protected  boolean itemRequiredForUnselected(Vector packs)
          Verifies if an item is required for any of the packs listed.
 void makeXMLData(net.n3.nanoxml.XMLElement panelRoot)
          Asks the panel to set its own XML data that can be brought back for an automated installation process.
 void panelActivate()
          This method is called when the panel becomes active.
 void panelDeactivate()
           
protected  boolean readCheckBox(Object[] field)
          Reads the content of the checkbox field and substitutes the associated variable.
protected  boolean readComboBox(Object[] field)
          Reads the content of the combobox field and substitutes the associated variable.
protected  boolean readInput()
          Reads the input data from all UI elements and sets the associated variables.
protected  boolean readPasswordField(Object[] field)
          Reads the content of the password field and substitutes the associated variable.
protected  boolean readRadioButton(Object[] field)
          Reads the content of the radio button field and substitutes the associated variable.
protected  boolean readRuleField(Object[] field)
          Reads the data from the rule input field and sets the associated variable.
protected  boolean readSearch(Object[] field)
          Reads the content of the search field and substitutes the associated variable.
protected  void readSpec()
          Reads the XML specification for the panel layout.
protected  boolean readTextField(Object[] field)
          Reads data from the text field and sets the associated variable.
protected  void setTitle(String title)
           
 
Methods inherited from class com.izforge.izpack.installer.IzPanel
askQuestion, askQuestion, buildHeadline, completeGridBagLayout, createLabel, createLabel, createMultiLineLabel, createMultiLineLabel, createMultiLineLabelLang, emitError, emitNotification, emitWarning, getClassName, getControlTextFont, getDefaultGridBagConstraints, getI18nStringForClass, getImageIcon, getInitialFocus, getInstallerFrame, getLAF, getNewGridBagConstraints, getNewGridBagConstraints, getNextXGridBagConstraints, getNextYGridBagConstraints, getNextYGridBagConstraints, getString, getSummaryBody, getSummaryCaption, init, resetGridCounter, setDefaultGridBagConstraints, setInitialFocus, setLayout, startGridBagLayout
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sTitle

protected String sTitle

gcp

protected GeronimoConfigProcessor gcp

fAdvancedMode

protected static boolean fAdvancedMode

POS_SUPPRESS

protected static final int POS_SUPPRESS
See Also:
Constant Field Values

POS_DISPLAYED

protected static final int POS_DISPLAYED
See Also:
Constant Field Values

POS_TYPE

protected static final int POS_TYPE
See Also:
Constant Field Values

POS_VARIABLE

protected static final int POS_VARIABLE
See Also:
Constant Field Values

POS_CONSTRAINTS

protected static final int POS_CONSTRAINTS
See Also:
Constant Field Values

POS_FIELD

protected static final int POS_FIELD
See Also:
Constant Field Values

POS_PACKS

protected static final int POS_PACKS
See Also:
Constant Field Values

POS_OS

protected static final int POS_OS
See Also:
Constant Field Values

POS_TRUE

protected static final int POS_TRUE
See Also:
Constant Field Values

POS_FALSE

protected static final int POS_FALSE
See Also:
Constant Field Values

POS_MESSAGE

protected static final int POS_MESSAGE
See Also:
Constant Field Values

POS_GROUP

protected static final int POS_GROUP
See Also:
Constant Field Values

SPEC_FILE_NAME

protected static final String SPEC_FILE_NAME
The name of the XML file that specifies the panel layout

See Also:
Constant Field Values

LANG_FILE_NAME

protected static final String LANG_FILE_NAME
See Also:
Constant Field Values

NODE_ID

protected static final String NODE_ID
how the spec node for a specific panel is identified

See Also:
Constant Field Values

FIELD_NODE_ID

protected static final String FIELD_NODE_ID
See Also:
Constant Field Values

INSTANCE_IDENTIFIER

protected static final String INSTANCE_IDENTIFIER
See Also:
Constant Field Values

TYPE

protected static final String TYPE
See Also:
Constant Field Values

DESCRIPTION

protected static final String DESCRIPTION
See Also:
Constant Field Values

VARIABLE

protected static final String VARIABLE
See Also:
Constant Field Values

TEXT

protected static final String TEXT
See Also:
Constant Field Values

KEY

protected static final String KEY
See Also:
Constant Field Values

SPEC

protected static final String SPEC
See Also:
Constant Field Values

SET

protected static final String SET
See Also:
Constant Field Values

TRUE

protected static final String TRUE
See Also:
Constant Field Values

FALSE

protected static final String FALSE
See Also:
Constant Field Values

ALIGNMENT

protected static final String ALIGNMENT
See Also:
Constant Field Values

LEFT

protected static final String LEFT
See Also:
Constant Field Values

CENTER

protected static final String CENTER
See Also:
Constant Field Values

RIGHT

protected static final String RIGHT
See Also:
Constant Field Values

TOP

protected static final String TOP
See Also:
Constant Field Values

ITALICS

protected static final String ITALICS
See Also:
Constant Field Values

BOLD

protected static final String BOLD
See Also:
Constant Field Values

SIZE

protected static final String SIZE
See Also:
Constant Field Values

VALIDATOR

protected static final String VALIDATOR
See Also:
Constant Field Values

PROCESSOR

protected static final String PROCESSOR
See Also:
Constant Field Values

CLASS

protected static final String CLASS
See Also:
Constant Field Values

FIELD_LABEL

protected static final String FIELD_LABEL
See Also:
Constant Field Values

TITLE_FIELD

protected static final String TITLE_FIELD
See Also:
Constant Field Values

TEXT_FIELD

protected static final String TEXT_FIELD
See Also:
Constant Field Values

TEXT_SIZE

protected static final String TEXT_SIZE
See Also:
Constant Field Values

STATIC_TEXT

protected static final String STATIC_TEXT
See Also:
Constant Field Values

COMBO_FIELD

protected static final String COMBO_FIELD
See Also:
Constant Field Values

COMBO_CHOICE

protected static final String COMBO_CHOICE
See Also:
Constant Field Values

COMBO_VALUE

protected static final String COMBO_VALUE
See Also:
Constant Field Values

RADIO_FIELD

protected static final String RADIO_FIELD
See Also:
Constant Field Values

RADIO_CHOICE

protected static final String RADIO_CHOICE
See Also:
Constant Field Values

RADIO_VALUE

protected static final String RADIO_VALUE
See Also:
Constant Field Values

SPACE_FIELD

protected static final String SPACE_FIELD
See Also:
Constant Field Values

DIVIDER_FIELD

protected static final String DIVIDER_FIELD
See Also:
Constant Field Values

CHECK_FIELD

protected static final String CHECK_FIELD
See Also:
Constant Field Values

RULE_FIELD

protected static final String RULE_FIELD
See Also:
Constant Field Values

RULE_LAYOUT

protected static final String RULE_LAYOUT
See Also:
Constant Field Values

RULE_SEPARATOR

protected static final String RULE_SEPARATOR
See Also:
Constant Field Values

RULE_RESULT_FORMAT

protected static final String RULE_RESULT_FORMAT
See Also:
Constant Field Values

RULE_PLAIN_STRING

protected static final String RULE_PLAIN_STRING
See Also:
Constant Field Values

RULE_DISPLAY_FORMAT

protected static final String RULE_DISPLAY_FORMAT
See Also:
Constant Field Values

RULE_SPECIAL_SEPARATOR

protected static final String RULE_SPECIAL_SEPARATOR
See Also:
Constant Field Values

RULE_ENCRYPTED

protected static final String RULE_ENCRYPTED
See Also:
Constant Field Values

RULE_PARAM_NAME

protected static final String RULE_PARAM_NAME
See Also:
Constant Field Values

RULE_PARAM_VALUE

protected static final String RULE_PARAM_VALUE
See Also:
Constant Field Values

RULE_PARAM

protected static final String RULE_PARAM
See Also:
Constant Field Values

PWD_FIELD

protected static final String PWD_FIELD
See Also:
Constant Field Values

PWD_INPUT

protected static final String PWD_INPUT
See Also:
Constant Field Values

PWD_SIZE

protected static final String PWD_SIZE
See Also:
Constant Field Values

SEARCH_FIELD

protected static final String SEARCH_FIELD
See Also:
Constant Field Values

SEARCH_BUTTON_FIELD

protected static final String SEARCH_BUTTON_FIELD
See Also:
Constant Field Values

SEARCH_CHOICE

protected static final String SEARCH_CHOICE
See Also:
Constant Field Values

SEARCH_FILENAME

protected static final String SEARCH_FILENAME
See Also:
Constant Field Values

SEARCH_RESULT

protected static final String SEARCH_RESULT
See Also:
Constant Field Values

SEARCH_VALUE

protected static final String SEARCH_VALUE
See Also:
Constant Field Values

SEARCH_TYPE

protected static final String SEARCH_TYPE
See Also:
Constant Field Values

SEARCH_FILE

protected static final String SEARCH_FILE
See Also:
Constant Field Values

SEARCH_DIRECTORY

protected static final String SEARCH_DIRECTORY
See Also:
Constant Field Values

SEARCH_PARENTDIR

protected static final String SEARCH_PARENTDIR
See Also:
Constant Field Values

SEARCH_CHECKFILENAME

protected static final String SEARCH_CHECKFILENAME
See Also:
Constant Field Values

SELECTEDPACKS

protected static final String SELECTEDPACKS
See Also:
Constant Field Values

UNSELECTEDPACKS

protected static final String UNSELECTEDPACKS
See Also:
Constant Field Values

NAME

protected static final String NAME
See Also:
Constant Field Values

OS

protected static final String OS
See Also:
Constant Field Values

FAMILY

protected static final String FAMILY
See Also:
Constant Field Values

VALUE

protected static final String VALUE
See Also:
Constant Field Values

DEPENDS

protected static final String DEPENDS
See Also:
Constant Field Values

SUPPRESS

protected static final String SUPPRESS
See Also:
Constant Field Values

WHEN

protected static final String WHEN
See Also:
Constant Field Values

EXCLUSIVE

protected static final String EXCLUSIVE
See Also:
Constant Field Values

AUTO_INSTALL

protected static final String AUTO_INSTALL
See Also:
Constant Field Values

SELECTED_PACKS

protected static final String SELECTED_PACKS
See Also:
Constant Field Values

PANEL_PKG

protected static final String PANEL_PKG
See Also:
Constant Field Values

PACKS_PANEL

protected static final String PACKS_PANEL
See Also:
Constant Field Values

varMap

protected static HashMap varMap

fStaticInitComplete

protected static boolean fStaticInitComplete

instanceCount

protected static int instanceCount

instanceNumber

protected int instanceNumber

fInitComplete

protected boolean fInitComplete

packsDefined

protected boolean packsDefined
If there is a possibility that some UI elements will not get added we can not allow to go back to the PacksPanel, because the process of building the UI is not reversable. This variable keeps track if any packs have been defined and will be used to make a decision for locking the 'previous' button.


parentFrame

protected com.izforge.izpack.installer.InstallerFrame parentFrame

spec

protected net.n3.nanoxml.XMLElement spec
The parsed result from reading the XML specification from the file


haveSpec

protected boolean haveSpec

uiElements

protected Vector uiElements
Holds the references to all of the UI elements


buttonGroups

protected Vector buttonGroups
Holds the references to all radio button groups


passwordGroups

protected Vector passwordGroups
Holds the references to all password field groups


passwordGroupsRead

protected Vector passwordGroupsRead
used for temporary storage of references to password groups that have already been read in a given read cycle.


searchFields

protected Vector searchFields
Used to track search fields. Contains SearchField references.


layout

protected com.izforge.izpack.gui.TwoColumnLayout layout
Holds all user inputs for use in automated installation


langpack

protected com.izforge.izpack.LocaleDatabase langpack

fHasSetAdvancedMode

protected static boolean fHasSetAdvancedMode
Constructs a UserInputPanel.

Constructor Detail

ValidatePackSelections

public ValidatePackSelections(com.izforge.izpack.installer.InstallerFrame parent,
                              com.izforge.izpack.installer.InstallData installData)
Method Detail

setTitle

protected void setTitle(String title)

getTitle

protected String getTitle()

isValidated

public boolean isValidated()
Indicates wether the panel has been validated or not. The installer won't let the user go further through the installation process until the panel is validated. Default behavior is to return true.

Returns:
A boolean stating wether the panel has been validated or not.

panelActivate

public void panelActivate()
This method is called when the panel becomes active.


panelDeactivate

public void panelDeactivate()

makeXMLData

public void makeXMLData(net.n3.nanoxml.XMLElement panelRoot)
Asks the panel to set its own XML data that can be brought back for an automated installation process. Use it as a blackbox if your panel needs to do something even in automated mode.

Parameters:
panelRoot - The XML root element of the panels blackbox tree.

buildUI

protected void buildUI()
Builds the UI and makes it ready for display


readInput

protected boolean readInput()
Reads the input data from all UI elements and sets the associated variables.

Returns:
true if the operation is successdul, otherwise false.

readSpec

protected void readSpec()
                 throws Exception
Reads the XML specification for the panel layout. The result is stored in spec.

Throws:
Exception - for any problems in reading the specification

addTitle

protected void addTitle(net.n3.nanoxml.XMLElement spec)
Adds the title to the panel. There can only be one title, if mutiple titles are defined, they keep overwriting what has already be defined, so that the last definition is the one that prevails.

Parameters:
spec - a XMLElement containing the specification for the title.

addRuleField

protected void addRuleField(net.n3.nanoxml.XMLElement spec)
Adds a rule field to the list of UI elements.

Parameters:
spec - a XMLElement containing the specification for the rule field.

readRuleField

protected boolean readRuleField(Object[] field)
Reads the data from the rule input field and sets the associated variable.

Parameters:
field - the object array that holds the details of the field.
Returns:
true if there was no problem reading the data or if there was an irrecovarable problem. If there was a problem that can be corrected by the operator, an error dialog is popped up and false is returned.

addTextField

protected void addTextField(net.n3.nanoxml.XMLElement spec)
Adds a text field to the list of UI elements

Parameters:
spec - a XMLElement containing the specification for the text field.

readTextField

protected boolean readTextField(Object[] field)
Reads data from the text field and sets the associated variable.

Parameters:
field - the object array that holds the details of the field.
Returns:
true if there was no problem reading the data or if there was an irrecovarable problem. If there was a problem that can be corrected by the operator, an error dialog is popped up and false is returned.

addComboBox

protected void addComboBox(net.n3.nanoxml.XMLElement spec)
Adds a combo box to the list of UI elements.
This is a complete example of a valid XML specification
 
  
   
    <field type="combo" variable="testVariable">
      <description text="Description for the combo box" id="a key for translated text"/>
      <spec text="label" id="key for the label"/>
        <choice text="choice 1" id="" value="combo box 1"/>
        <choice text="choice 2" id="" value="combo box 2" set="true"/>
        <choice text="choice 3" id="" value="combo box 3"/>
        <choice text="choice 4" id="" value="combo box 4"/>
      </spec>
    </field>
    
   
  
 

Parameters:
spec - a XMLElement containing the specification for the combo box.

readComboBox

protected boolean readComboBox(Object[] field)
Reads the content of the combobox field and substitutes the associated variable.

Parameters:
field - the object array that holds the details of the field.
Returns:
true if there was no problem reading the data or if there was an irrecovarable problem. If there was a problem that can be corrected by the operator, an error dialog is popped up and false is returned.

addRadioButton

protected void addRadioButton(net.n3.nanoxml.XMLElement spec)
Adds a radio button set to the list of UI elements.
This is a complete example of a valid XML specification
 
  
   
    <field type="radio" variable="testVariable">
      <description text="Description for the radio buttons" id="a key for translated text"/>
      <spec text="label" id="key for the label"/>
        <choice text="radio 1" id="" value=""/>
        <choice text="radio 2" id="" value="" set="true"/>
        <choice text="radio 3" id="" value=""/>
        <choice text="radio 4" id="" value=""/>
        <choice text="radio 5" id="" value=""/>
      </spec>
    </field>
    
   
  
 

Parameters:
spec - a XMLElement containing the specification for the radio button set.

readRadioButton

protected boolean readRadioButton(Object[] field)
Reads the content of the radio button field and substitutes the associated variable.

Parameters:
field - the object array that holds the details of the field.
Returns:
true if there was no problem reading the data or if there was an irrecovarable problem. If there was a problem that can be corrected by the operator, an error dialog is popped up and false is returned.

addPasswordField

protected void addPasswordField(net.n3.nanoxml.XMLElement spec)
Adds one or more password fields to the list of UI elements.
This is a complete example of a valid XML specification
 
  
   
    <field type="password" variable="testVariable">
      <description align="left" txt="Please enter your password" id="a key for translated text"/>
      <spec>
        <pwd txt="Password" id="key for the label" size="10" set=""/>
        <pwd txt="Retype password" id="another key for the label" size="10" set=""/>
      </spec>
      <validator class="com.izforge.sample.PWDValidator" txt="Both versions of the password must match" id="key for the error text"/>
      <processor class="com.izforge.sample.PWDEncryptor"/>
    </field>
    
   
  
 

Parameters:
spec - a XMLElement containing the specification for the set of password fields.

readPasswordField

protected boolean readPasswordField(Object[] field)
Reads the content of the password field and substitutes the associated variable.

Parameters:
field - a password group that manages one or more passord fields.
Returns:
true if there was no problem reading the data or if there was an irrecovarable problem. If there was a problem that can be corrected by the operator, an error dialog is popped up and false is returned.

isFieldSuppressed

protected boolean isFieldSuppressed(Vector suppressions)

getFieldSuppressionList

protected Vector getFieldSuppressionList(net.n3.nanoxml.XMLElement spec)

addCheckBox

protected void addCheckBox(net.n3.nanoxml.XMLElement spec)
Adds a chackbox to the list of UI elements.

Parameters:
spec - a XMLElement containing the specification for the checkbox.

readCheckBox

protected boolean readCheckBox(Object[] field)
Reads the content of the checkbox field and substitutes the associated variable.

Parameters:
field - the object array that holds the details of the field.
Returns:
true if there was no problem reading the data or if there was an irrecovarable problem. If there was a problem that can be corrected by the operator, an error dialog is popped up and false is returned.

addSearch

protected void addSearch(net.n3.nanoxml.XMLElement spec)
Adds a search field to the list of UI elements.

This is a complete example of a valid XML specification

 
  
   
    <field type="search" variable="testVariable">
      <description text="Description for the search field" id="a key for translated text"/>
      <spec text="label" id="key for the label" filename="the_file_to_search" result="directory" /> <!-- values for result: directory, file -->
        <choice dir="directory1" set="true" /> <!-- default value -->
        <choice dir="dir2" />
      </spec>
    </field>
    
   
  
 

Parameters:
spec - a XMLElement containing the specification for the search field

readSearch

protected boolean readSearch(Object[] field)
Reads the content of the search field and substitutes the associated variable.

Parameters:
field - the object array that holds the details of the field.
Returns:
true if there was no problem reading the data or if there was an irrecovarable problem. If there was a problem that can be corrected by the operator, an error dialog is popped up and false is returned.

addText

protected void addText(net.n3.nanoxml.XMLElement spec)
Adds text to the list of UI elements

Parameters:
spec - a XMLElement containing the specification for the text.

addSpace

protected void addSpace(net.n3.nanoxml.XMLElement spec)
Adds a dummy field to the list of UI elements to act as spacer.

Parameters:
spec - a XMLElement containing other specifications. At present this information is not used but might be in future versions.

addDivider

protected void addDivider(net.n3.nanoxml.XMLElement spec)
Adds a dividing line to the list of UI elements act as separator.

Parameters:
spec - a XMLElement containing additional specifications.

addDescription

protected void addDescription(net.n3.nanoxml.XMLElement spec,
                              Vector forPacks,
                              Vector forOs,
                              Vector suppress)
Adds a description to the list of UI elements.

Parameters:
spec - a XMLElement containing the specification for the description.

getBoolean

protected boolean getBoolean(net.n3.nanoxml.XMLElement element,
                             String attribute,
                             boolean defaultValue)
Retrieves the value of a boolean attribute. If the attribute is found and the values equals the value of the constant TRUE then true is returned. If it equals FALSE the false is returned. In all other cases, including when the attribute is not found, the default value is returned.

Parameters:
element - the XMLElement to search for the attribute.
attribute - the attribute to search for
defaultValue - the default value to use if the attribute does not exist or a illegal value was discovered.
Returns:
true if the attribute is found and the value equals the the constant TRUE. < if the attribute is FALSE. In all other cases the default value is returned.

getFloat

protected float getFloat(net.n3.nanoxml.XMLElement element,
                         String attribute,
                         float defaultValue)
Retrieves the value of a floating point attribute. If the attribute is not found or the value is non-numeric then the default value is returned.

Parameters:
element - the XMLElement to search for the attribute.
attribute - the attribute to search for
defaultValue - the default value to use in case the attribute does not exist.
Returns:
the value of the attribute. If the attribute is not found or the content is not a legal integer, then the default value is returned.

getText

protected String getText(net.n3.nanoxml.XMLElement element)
Extracts the text from an XMLElement. The text must be defined in the resource file under the key defined in the id attribute or as value of the attribute text.

Parameters:
element - the XMLElement from which to extract the text.
Returns:
The text defined in the XMLElement. If no text can be located, null is returned.

getAlignment

protected int getAlignment(net.n3.nanoxml.XMLElement element)
Retreives the alignment setting for the XMLElement. The default value in case the ALIGNMENT attribute is not found or the value is illegal is TwoColumnConstraints.LEFT.

Parameters:
element - the XMLElement from which to extract the alignment setting.
Returns:
the alignement setting for the XMLElement. The value is either TwoColumnConstraints.LEFT, TwoColumnConstraints.CENTER or TwoColumnConstraints.RIGHT.
See Also:
TwoColumnConstraints

itemRequiredForOs

public boolean itemRequiredForOs(Vector os)
Verifies if an item is required for the operating system the installer executed. The configuration for this feature is:
<os family="unix"/>

Note:
If the list of the os is empty then true is always returnd.

Parameters:
os - The Vector of Strings. containing the os names
Returns:
true if the item is required for the os, otherwise returns false.

itemRequiredFor

protected boolean itemRequiredFor(Vector packs)
Verifies if an item is required for any of the packs listed. An item is required for a pack in the list if that pack is actually selected for installation.

Note:
If the list of selected packs is empty then true is always returnd. The same is true if the packs list is empty.

Parameters:
packs - a Vector of Strings. Each of the strings denotes a pack for which an item should be created if the pack is actually installed.
Returns:
true if the item is required for at least one pack in the list, otherwise returns false.

itemRequiredForUnselected

protected boolean itemRequiredForUnselected(Vector packs)
Verifies if an item is required for any of the packs listed. An item is required for a pack in the list if that pack is actually NOT selected for installation.

Note:
If the list of selected packs is empty then true is always returnd. The same is true if the packs list is empty.

Parameters:
packs - a Vector of Strings. Each of the strings denotes a pack for which an item should be created if the pack is actually installed.
Returns:
true if the item is required for at least one pack in the list, otherwise returns false.

getUiElements

protected Vector getUiElements()
Returns the uiElements.

Returns:
Returns the uiElements.


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.