public class UserInputPanel extends IzPanel
Modifier and Type | Class and Description |
---|---|
private class |
UserInputPanel.SearchField
This class encapsulates a lot of search field functionality.
|
private static class |
UserInputPanel.TextValuePair
This class can be used to associate a text string and a (text) value.
|
IzPanel.Filler
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
private static String |
ALIGNMENT |
private static String |
BOLD |
private Vector |
buttonGroups
Holds the references to all radio button groups
|
private static String |
CENTER |
private static String |
CHECK_FIELD |
private static String |
CLASS |
private static String |
COMBO_CHOICE |
private static String |
COMBO_FIELD |
private static String |
COMBO_VALUE |
private static String |
DESCRIPTION |
private static String |
DIVIDER_FIELD |
private Vector |
entries
Holds all user inputs for use in automated installation
|
private static String |
FALSE |
private static String |
FAMILY |
private static String |
FIELD_LABEL |
private static String |
FIELD_NODE_ID |
private boolean |
haveSpec |
private static String |
INSTANCE_IDENTIFIER |
private static int |
instanceCount |
protected int |
instanceNumber |
private static String |
ITALICS |
private static String |
KEY |
private static String |
LANG_FILE_NAME |
private LocaleDatabase |
langpack |
private TwoColumnLayout |
layout |
private static String |
LEFT |
private static String |
NAME |
private static String |
NODE_ID
how the spec node for a specific panel is identified
|
private static String |
OS |
private 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.
|
private InstallerFrame |
parentFrame |
private Vector |
passwordGroups
Holds the references to all password field groups
|
private Vector |
passwordGroupsRead
used for temporary storage of references to password groups that have already been read in a
given read cycle.
|
private static int |
POS_CONSTRAINTS |
private static int |
POS_DISPLAYED |
private static int |
POS_FALSE |
private static int |
POS_FIELD |
private static int |
POS_GROUP |
private static int |
POS_MESSAGE |
private static int |
POS_OS |
private static int |
POS_PACKS |
private static int |
POS_TRUE |
private static int |
POS_TYPE |
private static int |
POS_VARIABLE |
private static String |
PROCESSOR |
private static String |
PWD_FIELD |
private static String |
PWD_INPUT |
private static String |
PWD_SIZE |
private static String |
RADIO_CHOICE |
private static String |
RADIO_FIELD |
private static String |
RADIO_VALUE |
private static String |
RIGHT |
private static String |
RULE_DISPLAY_FORMAT |
private static String |
RULE_ENCRYPTED |
private static String |
RULE_FIELD |
private static String |
RULE_LAYOUT |
private static String |
RULE_PARAM |
private static String |
RULE_PARAM_NAME |
private static String |
RULE_PARAM_VALUE |
private static String |
RULE_PLAIN_STRING |
private static String |
RULE_RESULT_FORMAT |
private static String |
RULE_SEPARATOR |
private static String |
RULE_SPECIAL_SEPARATOR |
private static String |
SEARCH_BUTTON_FIELD |
private static String |
SEARCH_CHECKFILENAME |
private static String |
SEARCH_CHOICE |
private static String |
SEARCH_DIRECTORY |
private static String |
SEARCH_FIELD |
private static String |
SEARCH_FILE |
private static String |
SEARCH_FILENAME |
private static String |
SEARCH_PARENTDIR |
private static String |
SEARCH_RESULT |
private static String |
SEARCH_TYPE |
private static String |
SEARCH_VALUE |
private Vector |
searchFields
Used to track search fields.
|
private static String |
SELECTEDPACKS |
private static long |
serialVersionUID |
private static String |
SET |
private static String |
SIZE |
private static String |
SPACE_FIELD |
private net.n3.nanoxml.XMLElement |
spec
The parsed result from reading the XML specification from the file
|
private static String |
SPEC |
private static String |
SPEC_FILE_NAME
The name of the XML file that specifies the panel layout
|
private static String |
STATIC_TEXT |
private static String |
TEXT |
private static String |
TEXT_FIELD |
private static String |
TEXT_SIZE |
private static String |
TITLE_FIELD |
private static String |
TOP |
private static String |
TRUE |
private static String |
TYPE |
private Vector |
uiElements
Holds the references to all of the UI elements
|
private static String |
UNSELECTEDPACKS |
private static String |
VALIDATOR |
private static String |
VARIABLE |
COLS_1, d, D, defaultGridBagConstraints, gridBagLayoutStarted, gridxCounter, gridyCounter, headline, HEADLINE, headLineLabel, idata, initialFocus, izPanelLayout, myClassname, myFullClassname, myPrefix, parent, ROWS_1, X_ORIGIN, Y_ORIGIN
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ANSWER_CANCEL, ANSWER_NO, ANSWER_YES, CHOICES_YES_NO, CHOICES_YES_NO_CANCEL
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
UserInputPanel(InstallerFrame parent,
InstallData installData)
Constructs a
UserInputPanel . |
Modifier and Type | Method and Description |
---|---|
private void |
addCheckBox(net.n3.nanoxml.XMLElement spec)
Adds a chackbox to the list of UI elements.
|
private void |
addComboBox(net.n3.nanoxml.XMLElement spec)
Adds a combo box to the list of UI elements.
|
private void |
addDescription(net.n3.nanoxml.XMLElement spec,
Vector forPacks,
Vector forOs)
Adds a description to the list of UI elements.
|
private void |
addDivider(net.n3.nanoxml.XMLElement spec)
Adds a dividing line to the list of UI elements act as separator.
|
private void |
addPasswordField(net.n3.nanoxml.XMLElement spec)
Adds one or more password fields to the list of UI elements.
|
private void |
addRadioButton(net.n3.nanoxml.XMLElement spec)
Adds a radio button set to the list of UI elements.
|
private void |
addRuleField(net.n3.nanoxml.XMLElement spec)
Adds a rule field to the list of UI elements.
|
private void |
addSearch(net.n3.nanoxml.XMLElement spec)
Adds a search field to the list of UI elements.
|
private void |
addSpace(net.n3.nanoxml.XMLElement spec)
Adds a dummy field to the list of UI elements to act as spacer.
|
private void |
addText(net.n3.nanoxml.XMLElement spec)
Adds text to the list of UI elements
|
private void |
addTextField(net.n3.nanoxml.XMLElement spec)
Adds a text field to the list of UI elements
|
private void |
addTitle(net.n3.nanoxml.XMLElement spec)
Adds the title to the panel.
|
private void |
buildUI()
Builds the UI and makes it ready for display
|
private int |
getAlignment(net.n3.nanoxml.XMLElement element)
Retreives the alignment setting for the
XMLElement . |
private boolean |
getBoolean(net.n3.nanoxml.XMLElement element,
String attribute,
boolean defaultValue)
Retrieves the value of a boolean attribute.
|
private float |
getFloat(net.n3.nanoxml.XMLElement element,
String attribute,
float defaultValue)
Retrieves the value of a floating point attribute.
|
private String |
getText(net.n3.nanoxml.XMLElement element)
Extracts the text from an
XMLElement . |
protected Vector |
getUiElements()
Returns the uiElements.
|
boolean |
isValidated()
Indicates wether the panel has been validated or not.
|
private 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.
|
private 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.
|
private boolean |
readCheckBox(Object[] field)
Reads the content of the checkbox field and substitutes the associated variable.
|
private boolean |
readComboBox(Object[] field)
Reads the content of the combobox field and substitutes the associated variable.
|
private boolean |
readInput()
Reads the input data from all UI elements and sets the associated variables.
|
private boolean |
readPasswordField(Object[] field)
Reads the content of the password field and substitutes the associated variable.
|
private boolean |
readRadioButton(Object[] field)
Reads the content of the radio button field and substitutes the associated variable.
|
private boolean |
readRuleField(Object[] field)
Reads the data from the rule input field and sets the associated variable.
|
private boolean |
readSearch(Object[] field)
Reads the content of the search field and substitutes the associated variable.
|
private void |
readSpec()
Reads the XML specification for the panel layout.
|
private boolean |
readTextField(Object[] field)
Reads data from the text field and sets the associated variable.
|
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, panelDeactivate, resetGridCounter, setDefaultGridBagConstraints, setInitialFocus, setLayout, startGridBagLayout
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private static final long serialVersionUID
private static final int POS_DISPLAYED
private static final int POS_TYPE
private static final int POS_VARIABLE
private static final int POS_CONSTRAINTS
private static final int POS_FIELD
private static final int POS_PACKS
private static final int POS_OS
private static final int POS_TRUE
private static final int POS_FALSE
private static final int POS_MESSAGE
private static final int POS_GROUP
private static final String SPEC_FILE_NAME
private static final String LANG_FILE_NAME
private static final String NODE_ID
private static final String FIELD_NODE_ID
private static final String INSTANCE_IDENTIFIER
private static final String TYPE
private static final String DESCRIPTION
private static final String VARIABLE
private static final String TEXT
private static final String KEY
private static final String SPEC
private static final String SET
private static final String TRUE
private static final String FALSE
private static final String ALIGNMENT
private static final String LEFT
private static final String CENTER
private static final String RIGHT
private static final String TOP
private static final String ITALICS
private static final String BOLD
private static final String SIZE
private static final String VALIDATOR
private static final String PROCESSOR
private static final String CLASS
private static final String FIELD_LABEL
private static final String TITLE_FIELD
private static final String TEXT_FIELD
private static final String TEXT_SIZE
private static final String STATIC_TEXT
private static final String COMBO_FIELD
private static final String COMBO_CHOICE
private static final String COMBO_VALUE
private static final String RADIO_FIELD
private static final String RADIO_CHOICE
private static final String RADIO_VALUE
private static final String SPACE_FIELD
private static final String DIVIDER_FIELD
private static final String CHECK_FIELD
private static final String RULE_FIELD
private static final String RULE_LAYOUT
private static final String RULE_SEPARATOR
private static final String RULE_RESULT_FORMAT
private static final String RULE_PLAIN_STRING
private static final String RULE_DISPLAY_FORMAT
private static final String RULE_SPECIAL_SEPARATOR
private static final String RULE_ENCRYPTED
private static final String RULE_PARAM_NAME
private static final String RULE_PARAM_VALUE
private static final String RULE_PARAM
private static final String PWD_FIELD
private static final String PWD_INPUT
private static final String PWD_SIZE
private static final String SEARCH_FIELD
private static final String SEARCH_BUTTON_FIELD
private static final String SEARCH_CHOICE
private static final String SEARCH_FILENAME
private static final String SEARCH_RESULT
private static final String SEARCH_VALUE
private static final String SEARCH_TYPE
private static final String SEARCH_FILE
private static final String SEARCH_DIRECTORY
private static final String SEARCH_PARENTDIR
private static final String SEARCH_CHECKFILENAME
private static final String SELECTEDPACKS
private static final String UNSELECTEDPACKS
private static final String NAME
private static final String OS
private static final String FAMILY
private static int instanceCount
protected int instanceNumber
private boolean packsDefined
private InstallerFrame parentFrame
private net.n3.nanoxml.XMLElement spec
private boolean haveSpec
private Vector uiElements
private Vector buttonGroups
private Vector passwordGroups
private Vector passwordGroupsRead
private Vector searchFields
private TwoColumnLayout layout
private LocaleDatabase langpack
public UserInputPanel(InstallerFrame parent, InstallData installData)
UserInputPanel
.parent
- reference to the application frameinstallData
- shared information about the installationpublic boolean isValidated()
isValidated
in class IzPanel
public void panelActivate()
panelActivate
in class IzPanel
public void makeXMLData(net.n3.nanoxml.XMLElement panelRoot)
makeXMLData
in class IzPanel
panelRoot
- The XML root element of the panels blackbox tree.private void buildUI()
private boolean readInput()
true
if the operation is successdul, otherwise false
.private void readSpec() throws Exception
Exception
- for any problems in reading the specificationprivate void addTitle(net.n3.nanoxml.XMLElement spec)
spec
- a XMLElement
containing the specification for the title.private void addRuleField(net.n3.nanoxml.XMLElement spec)
spec
- a XMLElement
containing the specification for the rule field.private boolean readRuleField(Object[] field)
field
- the object array that holds the details of the field.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.private void addTextField(net.n3.nanoxml.XMLElement spec)
spec
- a XMLElement
containing the specification for the text field.private boolean readTextField(Object[] field)
field
- the object array that holds the details of the field.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.private void addComboBox(net.n3.nanoxml.XMLElement spec)
<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>
spec
- a XMLElement
containing the specification for the combo box.private boolean readComboBox(Object[] field)
field
- the object array that holds the details of the field.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.private void addRadioButton(net.n3.nanoxml.XMLElement spec)
<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>
spec
- a XMLElement
containing the specification for the radio button
set.private boolean readRadioButton(Object[] field)
field
- the object array that holds the details of the field.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.private void addPasswordField(net.n3.nanoxml.XMLElement spec)
<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>
spec
- a XMLElement
containing the specification for the set of password
fields.private boolean readPasswordField(Object[] field)
field
- a password group that manages one or more passord fields.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.private void addCheckBox(net.n3.nanoxml.XMLElement spec)
spec
- a XMLElement
containing the specification for the checkbox.private boolean readCheckBox(Object[] field)
field
- the object array that holds the details of the field.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.private void addSearch(net.n3.nanoxml.XMLElement spec)
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>
spec
- a XMLElement
containing the specification for the search fieldprivate boolean readSearch(Object[] field)
field
- the object array that holds the details of the field.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.private void addText(net.n3.nanoxml.XMLElement spec)
spec
- a XMLElement
containing the specification for the text.private void addSpace(net.n3.nanoxml.XMLElement spec)
spec
- a XMLElement
containing other specifications. At present this
information is not used but might be in future versions.private void addDivider(net.n3.nanoxml.XMLElement spec)
spec
- a XMLElement
containing additional specifications.private void addDescription(net.n3.nanoxml.XMLElement spec, Vector forPacks, Vector forOs)
spec
- a XMLElement
containing the specification for the description.private boolean getBoolean(net.n3.nanoxml.XMLElement element, String attribute, boolean defaultValue)
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.element
- the XMLElement
to search for the attribute.attribute
- the attribute to search fordefaultValue
- the default value to use if the attribute does not exist or a illegal
value was discovered.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.
private float getFloat(net.n3.nanoxml.XMLElement element, String attribute, float defaultValue)
element
- the XMLElement
to search for the attribute.attribute
- the attribute to search fordefaultValue
- the default value to use in case the attribute does not exist.private String getText(net.n3.nanoxml.XMLElement element)
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
.element
- the XMLElement
from which to extract the text.XMLElement
. If no text can be located,
null
is returned.private int getAlignment(net.n3.nanoxml.XMLElement element)
XMLElement
. The default value in case
the ALIGNMENT
attribute is not found or the value is illegal is
TwoColumnConstraints.LEFT
.element
- the XMLElement
from which to extract the alignment setting.XMLElement
. The value is either
TwoColumnConstraints.LEFT
, TwoColumnConstraints.CENTER
or
TwoColumnConstraints.RIGHT
.TwoColumnConstraints
public boolean itemRequiredForOs(Vector os)
true
is always returnd.os
- The Vector
of String
s. containing the os namestrue
if the item is required for the os, otherwise returns
false
.private boolean itemRequiredFor(Vector packs)
true
is always returnd. The same
is true if the packs
list is empty.packs
- a Vector
of String
s. Each of the strings denotes
a pack for which an item should be created if the pack is actually installed.true
if the item is required for at least one pack in the list,
otherwise returns false
.private boolean itemRequiredForUnselected(Vector packs)
true
is always returnd. The same
is true if the packs
list is empty.packs
- a Vector
of String
s. Each of the strings denotes
a pack for which an item should be created if the pack is actually installed.true
if the item is required for at least one pack in the list,
otherwise returns false
.protected Vector getUiElements()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses