Class 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: The title of the step which the user will see. A prompt which will indicate to the user what is being asked for. An inputMethod which will be the impetus for construction of the dialog. A list of validInputs which will appear as labels or actual input. A name for the variable manager called variableName, which is the root for all variables set here. A default value which will be set into the variableName(s). Additionally this vector is set by the process: A vector of displayedItems 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. The getResolvedVector 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 the setVM(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 in getComponent() 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 Vector validInputs which is set from the setValidInputsAsCommaSeparatedString, and retrieved from getValidInputsAsCommaSeparatedString. 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. The validInputs 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 Detail

      • GetUserInputSimplePanel

        public GetUserInputSimplePanel()
    • 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.