Class ConstantPromptEditorTransform

    • Constructor Detail

      • ConstantPromptEditorTransform

        public ConstantPromptEditorTransform()
    • Method Detail

      • initializeTransform

        public void initializeTransform​(Transformable data)
        Description copied from class: AbstractAppTransform

        This method initialize the private and protected fields of the transform, such as width and height. It also invokes the initializeWebComponent, initializeImages and initializeCss methods.

        This method is automatically called from the transform method. Transforms which would like to invoke other methods in this instance directly (for example, to invoke some render methods), need first to call this method to guarantee that the Transform is ready to generate output.
        Specified by:
        initializeTransform in interface AppTransform
        Overrides:
        initializeTransform in class AbstractPromptEditorTransform
        Parameters:
        data - the bean to transform.
      • isDatePrompt

        public boolean isDatePrompt()
      • isNumericPrompt

        public boolean isNumericPrompt()
      • isTextPrompt

        public boolean isTextPrompt()
      • isBigDecPrompt

        public boolean isBigDecPrompt()
      • hasDefault

        public boolean hasDefault​(int dataType)
        Returns whether the default answer is available for this data type. If the input data type is the same as the corrent defined prompt, then it will return true for having default answer, otherwise false. If the input data type is not the current data type, false will be returned. This means for editing, default value is false.
        Parameters:
        dataType - The data type to query
      • addDefaultValueAttr

        public java.util.Map addDefaultValueAttr​(int dataType)
        Returns the attribute map for default value attribute. If the input data type is the same as the current defined prompt and it has a default value, then this method will return the default value in attribute map. For other cases, except date data type, no attribute will be added. When the input data type is date, and the current prompt is not a date prompt, then the current date will be added as the default value attribute. This means GUI will show current date as default for default value for date type, when the current prompt data type is not Date. This will let calendar picker correctly show the date.
        Parameters:
        dataType -
      • addMinValueAttr

        public java.util.Map addMinValueAttr​(int dataType)
        Returns the attribute map for mininum value attribute. If the input data type is the same as the current defined prompt, then this method will return minimum value in attribute map. For other cases, except date data type, no attribute will be added. When the input data type is date, and the current prompt is not a date prompt, then the current date will be added as the minimum value attribute. This means GUI will show current date as default for minimum value for date type, when the current prompt data type is not Date. This will let calendar picker correctly show the date.
        Parameters:
        dataType -
      • addMaxValueAttr

        public java.util.Map addMaxValueAttr​(int dataType)
        Returns the attribute map for mininum value attribute. If the input data type is the same as the current defined prompt, then this method will return maximum value in attribute map. For other cases, except date data type, no attribute will be added. When the input data type is date, and the current prompt is not a date prompt, then the current date will be added as the maximum value attribute. This means GUI will show current date as default for maximum value for date type, when the current prompt data type is not Date. This will let calendar picker correctly show the date.
        Parameters:
        dataType -
      • hasMin

        public boolean hasMin​(int dataType)
        Returns whether prompt has a minimum value for this data type. If the input data type is the same as the current defined prompt, then this method will return true if it has a minimum value, otherwise false. If the input data type is not the current data type of the prompt, false will be returned always.
        Parameters:
        dataType -
      • hasMax

        public boolean hasMax​(int dataType)
        Returns whether prompt has a maximum value for this data type. If the input data type is the same as the current defined prompt, then this method will return true if it has a maximum value, otherwise false. If the input data type is not the current data type of the prompt, false will be returned always.
        Parameters:
        dataType -
      • isShowTimePicker

        public boolean isShowTimePicker()
      • getPropertyAsValue

        public java.util.Map<java.lang.String,​java.lang.String> getPropertyAsValue​(java.lang.String property)
      • isLatitude

        public boolean isLatitude()
      • isLongitude

        public boolean isLongitude()