Package com.zerog.ia.auto.project.panels
Class GetUserInputSimplePanel
- java.lang.Object
-
- com.zerog.ia.auto.project.ProjectObject
-
- com.zerog.ia.auto.project.InstallableObject
-
- com.zerog.ia.auto.project.panels.InstallPanelAction
-
- com.zerog.ia.auto.project.panels.GetUserInputSimplePanel
-
- All Implemented Interfaces:
Referenceable
public final class GetUserInputSimplePanel extends InstallPanelAction
This class is an InstallAnywhere Advanced Action. It is provided to allow user to create custom dialog boxes that will add a variables to the VariableManager with the minimum of engineering effort. How it works: The build engineer will define these in the designer: Thetitle
of the step which the user will see. Aprompt
which will indicate to the user what is being asked for. AninputMethod
which will be the impetus for construction of the dialog. A list ofvalidInputs
which will appear as labels or actual input. A name for the variable manager calledvariableName
, which is the root for all variables set here. A defaultvalue
which will be set into the variableName(s). Additionally this vector is set by the process: A vector ofdisplayedItems
which provides access into the gui once made. When the build engineer sets these in the customizer, they are merely stored by the appropriate bean properities setters. At install time, however they are transformed with new values by the VariableManager. The title and prompt can be Variable Manager variables. At install time, these will resolve with their getters. This gets the potential variable out of the manager. ThegetResolvedVector
function resolves each of the inputs. So there can be a variable manager variables in the inputs The inputMethod and variableName cannot be variable manager variables. The default values are set to variable manager variables in a process described in thesetVM(index, theValue)
javadoc. Basically, this can be a comma separated list, and each part can be a variable or a literal. A component is made ingetComponent()
which is passed on to whatever calls it (probably our gui). The cases are: TEXTFIELD, no validInputs for labels: makes a single textfield in a panel, only one variable will be set. TEXTFIELD, one or more validInputs: uses the valid inputs as labels, several variables are set, and populated with the defaults (from value). One variable is set for each field with a null value if there is no default. The main variable has a comma separated string of the defaults before, and user typed text (but not blank fields) after gui is displayed. CHOICE: adds the valid inputs as selectable items in the choice, one variable is set for the whole with the value of the user's choice. CHECKBOX: adds the valid inputs as the labels for each checkbox. One variable is set for each chosen item, plus one with a comma separated string of the chosen ones. CHECKBOXGROUP: adds the valid inputs as the labels for each radio button. One variable is set for the whole with the value of the chosen button. LIST: adds the valid inputs as the items in the list. Multiple items can be selected. One for variable for each item selected is set, plus one comma separated list of the selected items. Internationalization issues: getExternalizedProperties returns a list of those properties that are automagically localized from the defaults file. A special case is VectorvalidInputs
which is set from thesetValidInputsAsCommaSeparatedString
, and retrieved fromgetValidInputsAsCommaSeparatedString
. These are localized after the developer builds an installer by the customer who reads the various localized files and changes the text therein as necessary. You, as a ZG programmer, don't need to worry much more than that. Developers can preselect/prefill values in their installers by specifying them in the "Results:Defaults" textfield as a comma separated list of strings, according to these rules: TEXTFIELD: One string from the list of defaults will appear in each of the displayed textfields in order. CHOICE: The first item in the list of defaults is preselected. CHECKBOX and LIST: Every checkbox whose label appears in the list of defaults will be set true. CHECKBOXGROUP: The first checkbox whose label appears in the list of defaults will be set true. ThevalidInputs
can be literal text, variables, or literal text surrounded by quotes, which will be neither substituted, nor be parsed by comma...commas are otherwise reserved for separating the list of gui elements. Members:
-
-
Constructor Summary
Constructors Constructor Description GetUserInputSimplePanel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getApparentInputMethod()
gets the apparent input methodBidiOption
getBidiOption()
gets the bidi optionjava.awt.Color
getControlsBackgroundColor()
gets the color of the background of the controls.java.awt.Font
getControlsFont()
gets the font of the controls.java.awt.Color
getControlsFontColor()
gets the color of the font of the controls.java.util.Vector<InputItem>
getInputItems()
gets the input itemsjava.lang.String
getInputMethod()
gets the input method: textfields, checkboxes, radio buttons, pop-up menu, listjava.awt.Font
getLabelsFont()
gets the font of the labels.java.awt.Color
getLabelsFontColor()
gets the color of the font of the labels.java.lang.String
getPrompt()
gets the Prompt of the paneljava.lang.String
getTitle()
Title of the paneljava.lang.String
getVariableName()
The result variable nameboolean
isLabelsBeside()
Whether the labels should appear beside the text fields (as opposite to above them).boolean
isUseDefaultControlsBackgroundColor()
Whether to use the default color for the background of the controls.boolean
isUseDefaultControlsFontColor()
Whether to use the default color for the font of the controls.boolean
isUseDefaultControlsFontSettings()
Whether to use the default font for the controls.boolean
isUseDefaultLabelsFontColor()
Whether to use the default color for the font of the labels.boolean
isUseDefaultLabelsFontSettings()
Whether to use the default font for the labels.boolean
isUseFixedHeightPrompt()
Whether to use fixed height for prompt.void
setApparentInputMethod(java.lang.String s)
sets the apparent input methodvoid
setBidiOption(BidiOption bidiOption)
sets the bidi optionvoid
setControlsBackgroundColor(java.awt.Color controlsBackgroundColor)
sets the color of the background of the controls.void
setControlsFont(java.awt.Font controlsFont)
sets the font of the controls.void
setControlsFontColor(java.awt.Color controlsFontColor)
sets the color of the font of the controls.void
setInputItems(java.util.Vector<InputItem> inputItems)
sets the input itemsvoid
setInputMethod(java.lang.String inputMethod)
sets the input method: textfields, checkboxes, radio buttons, pop-up menu, listvoid
setLabelsBeside(boolean labelsBeside)
Whether the labels should appear beside the text fields (as opposite to above them).void
setLabelsFont(java.awt.Font labelsFont)
sets the font of the labels.void
setLabelsFontColor(java.awt.Color labelsFontColor)
sets the color of the font of the labels.void
setPrompt(java.lang.String prompt)
Prompt of the panelvoid
setTitle(java.lang.String title)
Title of the panelvoid
setUseDefaultControlsBackgroundColor(boolean useDefaultControlsBackgroundColor)
Whether to use the default color for the background of the controls.void
setUseDefaultControlsFontColor(boolean useDefaultControlsFontColor)
Whether to use the default color for the font of the controls.void
setUseDefaultControlsFontSettings(boolean useDefaultFontSettings)
Whether to use the default font for the controls.void
setUseDefaultLabelsFontColor(boolean useDefaultLabelsFontColor)
Whether to use the default color for the font of the labels.void
setUseDefaultLabelsFontSettings(boolean useDefaultLabelsFontSettings)
Whether to use the default font for the labels.void
setUseFixedHeightPrompt(boolean useFixedHeightPrompt)
Whether to use fixed height for prompt.void
setVariableName(java.lang.String variableName)
The Result variable name-
Methods inherited from class com.zerog.ia.auto.project.panels.InstallPanelAction
getArchivesSigned, getDependencies, getHelp, getImage, getImageOption, getInstallPanelClassName, getLabelIndex, getLabelOption, getResource, setArchivesSigned, setDependencies, setHelp, setImage, setImageOption, setInstallPanelClassName, setLabelIndex, setLabelOption, setResource
-
Methods inherited from class com.zerog.ia.auto.project.InstallableObject
getBelongsToUninstallPhase, getRollbackEnabledCancel, getRollbackEnabledError, getRuleExpression, getRules, getRulesLogicalOperation, getTagsInInstallPiece, setBelongsToUninstallPhase, setRollbackEnabledCancel, setRollbackEnabledError, setRuleExpression, setRulesLogicalOperation, setTagsInInstallPiece
-
Methods inherited from class com.zerog.ia.auto.project.ProjectObject
equals, getReferenceID, hashCode, setReferenceID
-
-
-
-
Method Detail
-
getBidiOption
public BidiOption getBidiOption()
gets the bidi option
-
setBidiOption
public void setBidiOption(BidiOption bidiOption)
sets the bidi option
-
getTitle
public java.lang.String getTitle()
Title of the panel
-
getPrompt
public java.lang.String getPrompt()
gets the Prompt of the panel
-
getInputMethod
public java.lang.String getInputMethod()
gets the input method: textfields, checkboxes, radio buttons, pop-up menu, list
-
getApparentInputMethod
public java.lang.String getApparentInputMethod()
gets the apparent input method
-
setApparentInputMethod
public void setApparentInputMethod(java.lang.String s)
sets the apparent input method
-
getVariableName
public java.lang.String getVariableName()
The result variable name
-
setTitle
public void setTitle(java.lang.String title)
Title of the panel
-
setPrompt
public void setPrompt(java.lang.String prompt)
Prompt of the panel
-
setInputMethod
public void setInputMethod(java.lang.String inputMethod)
sets the input method: textfields, checkboxes, radio buttons, pop-up menu, list
-
setVariableName
public void setVariableName(java.lang.String variableName)
The Result variable name
-
setInputItems
public void setInputItems(java.util.Vector<InputItem> inputItems)
sets the input items
-
getInputItems
public java.util.Vector<InputItem> getInputItems()
gets the input items
-
getControlsBackgroundColor
public java.awt.Color getControlsBackgroundColor()
gets the color of the background of the controls.
-
setControlsBackgroundColor
public void setControlsBackgroundColor(java.awt.Color controlsBackgroundColor)
sets the color of the background of the controls.
-
getControlsFontColor
public java.awt.Color getControlsFontColor()
gets the color of the font of the controls.
-
setControlsFontColor
public void setControlsFontColor(java.awt.Color controlsFontColor)
sets the color of the font of the controls.
-
isUseDefaultControlsBackgroundColor
public boolean isUseDefaultControlsBackgroundColor()
Whether to use the default color for the background of the controls.
-
setUseDefaultControlsBackgroundColor
public void setUseDefaultControlsBackgroundColor(boolean useDefaultControlsBackgroundColor)
Whether to use the default color for the background of the controls.
-
isUseDefaultControlsFontColor
public boolean isUseDefaultControlsFontColor()
Whether to use the default color for the font of the controls.
-
setUseDefaultControlsFontColor
public void setUseDefaultControlsFontColor(boolean useDefaultControlsFontColor)
Whether to use the default color for the font of the controls.
-
isUseFixedHeightPrompt
public boolean isUseFixedHeightPrompt()
Whether to use fixed height for prompt.
-
setUseFixedHeightPrompt
public void setUseFixedHeightPrompt(boolean useFixedHeightPrompt)
Whether to use fixed height for prompt.
-
getControlsFont
public java.awt.Font getControlsFont()
gets the font of the controls.
-
setControlsFont
public void setControlsFont(java.awt.Font controlsFont)
sets the font of the controls.
-
isLabelsBeside
public boolean isLabelsBeside()
Whether the labels should appear beside the text fields (as opposite to above them).
-
setLabelsBeside
public void setLabelsBeside(boolean labelsBeside)
Whether the labels should appear beside the text fields (as opposite to above them).
-
isUseDefaultControlsFontSettings
public boolean isUseDefaultControlsFontSettings()
Whether to use the default font for the controls.
-
setUseDefaultControlsFontSettings
public void setUseDefaultControlsFontSettings(boolean useDefaultFontSettings)
Whether to use the default font for the controls.
-
getLabelsFont
public java.awt.Font getLabelsFont()
gets the font of the labels.
-
setLabelsFont
public void setLabelsFont(java.awt.Font labelsFont)
sets the font of the labels.
-
getLabelsFontColor
public java.awt.Color getLabelsFontColor()
gets the color of the font of the labels.
-
setLabelsFontColor
public void setLabelsFontColor(java.awt.Color labelsFontColor)
sets the color of the font of the labels.
-
isUseDefaultLabelsFontColor
public boolean isUseDefaultLabelsFontColor()
Whether to use the default color for the font of the labels.
-
setUseDefaultLabelsFontColor
public void setUseDefaultLabelsFontColor(boolean useDefaultLabelsFontColor)
Whether to use the default color for the font of the labels.
-
isUseDefaultLabelsFontSettings
public boolean isUseDefaultLabelsFontSettings()
Whether to use the default font for the labels.
-
setUseDefaultLabelsFontSettings
public void setUseDefaultLabelsFontSettings(boolean useDefaultLabelsFontSettings)
Whether to use the default font for the labels.
-
-