Class NumericFormElement

java.lang.Object
com.foreach.across.modules.web.ui.elements.ContainerViewElement
com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
com.foreach.across.modules.bootstrapui.elements.FormControlElementSupport
com.foreach.across.modules.bootstrapui.elements.NumericFormElement
All Implemented Interfaces:
ConfigurablePlaceholderText, FormControlElement, FormControlElement.Proxy, FormInputElement, com.foreach.across.modules.web.ui.elements.HtmlViewElement, com.foreach.across.modules.web.ui.MutableViewElement, com.foreach.across.modules.web.ui.ViewElement

public class NumericFormElement extends FormControlElementSupport implements FormControlElement.Proxy, ConfigurablePlaceholderText
Form input control that represents a formatted numeric input field, for example currency or percentage.
Author:
Arne Vandamme
  • Field Details

  • Constructor Details

    • NumericFormElement

      public NumericFormElement()
  • Method Details

    • getControl

      public TextboxFormElement getControl()
      Specified by:
      getControl in interface FormControlElement.Proxy
      Returns:
      the actual control
    • getConfiguration

      public NumericFormElementConfiguration getConfiguration()
    • setConfiguration

      public NumericFormElement setConfiguration(@NonNull @NonNull NumericFormElementConfiguration configuration)
    • setPlaceholder

      public NumericFormElement setPlaceholder(String placeholder)
      Specified by:
      setPlaceholder in interface ConfigurablePlaceholderText
    • getPlaceholder

      public String getPlaceholder()
      Specified by:
      getPlaceholder in interface ConfigurablePlaceholderText
    • isReadonly

      public boolean isReadonly()
      Specified by:
      isReadonly in interface FormControlElement
      Overrides:
      isReadonly in class FormControlElementSupport
    • setReadonly

      public NumericFormElement setReadonly(boolean readonly)
      Specified by:
      setReadonly in interface FormControlElement
      Overrides:
      setReadonly in class FormControlElementSupport
      Returns:
      this.
    • isRequired

      public boolean isRequired()
      Specified by:
      isRequired in interface FormControlElement
      Overrides:
      isRequired in class FormControlElementSupport
    • setRequired

      public NumericFormElement setRequired(boolean required)
      Specified by:
      setRequired in interface FormControlElement
      Overrides:
      setRequired in class FormControlElementSupport
      Returns:
      this.
    • getControlName

      public String getControlName()
      Specified by:
      getControlName in interface FormInputElement
      Overrides:
      getControlName in class FormControlElementSupport
    • setControlName

      public NumericFormElement setControlName(String controlName)
      Specified by:
      setControlName in interface FormInputElement
      Overrides:
      setControlName in class FormControlElementSupport
    • isDisabled

      public boolean isDisabled()
      Specified by:
      isDisabled in interface FormInputElement
      Overrides:
      isDisabled in class FormControlElementSupport
    • setDisabled

      public NumericFormElement setDisabled(boolean disabled)
      Specified by:
      setDisabled in interface FormInputElement
      Overrides:
      setDisabled in class FormControlElementSupport
      Returns:
      this.
    • getTagName

      public String getTagName()
      Specified by:
      getTagName in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Overrides:
      getTagName in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • addCssClass

      public NumericFormElement addCssClass(String... cssClass)
      Specified by:
      addCssClass in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Overrides:
      addCssClass in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • hasCssClass

      public boolean hasCssClass(String cssClass)
      Specified by:
      hasCssClass in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Overrides:
      hasCssClass in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • removeCssClass

      public NumericFormElement removeCssClass(String... cssClass)
      Specified by:
      removeCssClass in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Overrides:
      removeCssClass in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • setHtmlId

      public NumericFormElement setHtmlId(String id)
      Specified by:
      setHtmlId in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Overrides:
      setHtmlId in class FormControlElementSupport
    • getHtmlId

      public String getHtmlId()
      Specified by:
      getHtmlId in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Overrides:
      getHtmlId in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • getAttributes

      public Map<String,Object> getAttributes()
      Specified by:
      getAttributes in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Overrides:
      getAttributes in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • setAttributes

      public NumericFormElement setAttributes(Map<String,Object> attributes)
      Specified by:
      setAttributes in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Overrides:
      setAttributes in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • setAttribute

      public NumericFormElement setAttribute(String attributeName, Object attributeValue)
      Specified by:
      setAttribute in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Overrides:
      setAttribute in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • addAttributes

      public NumericFormElement addAttributes(Map<String,Object> attributes)
      Specified by:
      addAttributes in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Overrides:
      addAttributes in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • removeAttribute

      public NumericFormElement removeAttribute(String attributeName)
      Specified by:
      removeAttribute in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Overrides:
      removeAttribute in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • getAttribute

      public Object getAttribute(String attributeName)
      Specified by:
      getAttribute in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Overrides:
      getAttribute in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • getAttribute

      public <V, U extends V> U getAttribute(String attributeName, Class<V> expectedType)
      Specified by:
      getAttribute in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Overrides:
      getAttribute in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • hasAttribute

      public boolean hasAttribute(String attributeName)
      Specified by:
      hasAttribute in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Overrides:
      hasAttribute in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • getValue

      public Number getValue()
    • setValue

      public NumericFormElement setValue(Number value)
    • getChildren

      public List<com.foreach.across.modules.web.ui.ViewElement> getChildren()
      Overrides:
      getChildren in class com.foreach.across.modules.web.ui.elements.ContainerViewElement
    • setName

      public NumericFormElement setName(String name)
      Specified by:
      setName in interface com.foreach.across.modules.web.ui.MutableViewElement
      Overrides:
      setName in class FormControlElementSupport
    • setCustomTemplate

      public NumericFormElement setCustomTemplate(String customTemplate)
      Specified by:
      setCustomTemplate in interface com.foreach.across.modules.web.ui.MutableViewElement
      Overrides:
      setCustomTemplate in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • setElementType

      protected NumericFormElement setElementType(String elementType)
      Overrides:
      setElementType in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • addChild

      public NumericFormElement addChild(com.foreach.across.modules.web.ui.ViewElement element)
      Overrides:
      addChild in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • addChildren

      public NumericFormElement addChildren(Collection<? extends com.foreach.across.modules.web.ui.ViewElement> elements)
      Overrides:
      addChildren in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • addFirstChild

      public NumericFormElement addFirstChild(com.foreach.across.modules.web.ui.ViewElement element)
      Overrides:
      addFirstChild in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • clearChildren

      public NumericFormElement clearChildren()
      Overrides:
      clearChildren in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • apply

      public NumericFormElement apply(Consumer<com.foreach.across.modules.web.ui.elements.ContainerViewElement> consumer)
      Overrides:
      apply in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • applyUnsafe

      public <U extends com.foreach.across.modules.web.ui.ViewElement> NumericFormElement applyUnsafe(Consumer<U> consumer)
      Overrides:
      applyUnsafe in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • setTagName

      protected NumericFormElement setTagName(String tagName)
      Overrides:
      setTagName in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • set

      public NumericFormElement set(com.foreach.across.modules.web.ui.ViewElement.WitherSetter... setters)
      Specified by:
      set in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Specified by:
      set in interface com.foreach.across.modules.web.ui.MutableViewElement
      Specified by:
      set in interface com.foreach.across.modules.web.ui.ViewElement
      Overrides:
      set in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
    • remove

      public NumericFormElement remove(com.foreach.across.modules.web.ui.ViewElement.WitherRemover... functions)
      Specified by:
      remove in interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
      Specified by:
      remove in interface com.foreach.across.modules.web.ui.MutableViewElement
      Specified by:
      remove in interface com.foreach.across.modules.web.ui.ViewElement
      Overrides:
      remove in class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement