Class InputField

All Implemented Interfaces:
IFormField, IPlaceholderable, IAbstractElement, IBlockElement, IElement, IPropertyContainer

public class InputField extends FormField<InputField> implements IPlaceholderable
Extension of the FormField class representing a button so that a InputFieldRenderer is used.
  • Constructor Details

    • InputField

      public InputField (String id)
      Creates a new input field.
      Parameters:
      id - the id
  • Method Details

    • 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
    • getPlaceholder

      public Paragraph getPlaceholder()
      Gets the placeholder paragraph.
      Specified by:
      getPlaceholder in interface IPlaceholderable
      Returns:
      the placeholder paragraph
    • 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 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
    • 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.
    • getRotation

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

      protected IRenderer makeNewRenderer()
      Description copied from class: AbstractElement
      Creates new renderer instance.
      Specified by:
      makeNewRenderer in class AbstractElement<InputField>
      Returns:
      new IRenderer