Class InputField

    • Field Detail

      • X_OFFSET

        private static final float X_OFFSET
        Default padding X offset.
        See Also:
        Constant Field Values
      • placeholder

        private Paragraph placeholder
        The placeholder paragraph.
      • rotation

        private int rotation
        Field rotation, counterclockwise. Must be a multiple of 90 degrees.
    • Constructor Detail

      • InputField

        public InputField​(java.lang.String id)
        Creates a new input field.
        Parameters:
        id - the id
    • Method Detail

      • useAsPassword

        public InputField useAsPassword​(boolean isPassword)
        Determines, whether the input field will be password.

        Usually means that instead of glyphs '*' will be shown in case of flatten field.

        If the field is not flatten, value will be ignored.

        Parameters:
        isPassword - true is this field shall be considered as password, false otherwise
        Returns:
        this input field
      • setPlaceholder

        public void setPlaceholder​(Paragraph placeholder)
        Sets the placeholder paragraph.
        Specified by:
        setPlaceholder in interface IPlaceholderable
        Parameters:
        placeholder - the paragraph to be used as placeholder
      • getDefaultProperty

        public <T1> T1 getDefaultProperty​(int property)
        Description copied from class: FormField
        Gets the default property from this entity.
        Specified by:
        getDefaultProperty in interface IPropertyContainer
        Overrides:
        getDefaultProperty in class FormField<InputField>
        Type Parameters:
        T1 - the return type associated with the property
        Parameters:
        property - the property to be retrieved
        Returns:
        the default property value. If the default property is not defined, null will be returned
      • getRotation

        public int getRotation()
        Get rotation.
        Returns:
        rotation value.
      • setRotation

        public InputField setRotation​(int rotation)
        Set rotation of the input field.
        Parameters:
        rotation - new rotation value, counterclockwise. Must be a multiple of 90 degrees. It has sense only in interactive mode, see FormField.setInteractive(boolean)
        Returns:
        the edited InputField
      • setComb

        public InputField setComb​(boolean isComb)
        Sets Comb flag for the text field. Meaningful only if the MaxLen entry is present in the text field dictionary and if the Multiline, Password and FileSelect flags are clear.

        If true, the field is automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.

        Parameters:
        isComb - boolean value specifying whether to enable combing
        Returns:
        this InputField instance
      • setMaxLen

        public InputField setMaxLen​(int maxLen)
        Sets the maximum length of the field's text, in characters.
        Parameters:
        maxLen - the current maximum text length
        Returns:
        this InputField instance
      • setProperties

        private void setProperties()