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
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.foreach.across.modules.bootstrapui.elements.FormControlElement
FormControlElement.Proxy
Nested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
com.foreach.across.modules.web.ui.elements.HtmlViewElement.Functions
Nested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.MutableViewElement
com.foreach.across.modules.web.ui.MutableViewElement.Functions
Nested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.ViewElement
com.foreach.across.modules.web.ui.ViewElement.Wither<T extends com.foreach.across.modules.web.ui.ViewElement>, com.foreach.across.modules.web.ui.ViewElement.WitherGetter<T extends com.foreach.across.modules.web.ui.ViewElement,
U extends Object>, com.foreach.across.modules.web.ui.ViewElement.WitherRemover<T extends com.foreach.across.modules.web.ui.ViewElement>, com.foreach.across.modules.web.ui.ViewElement.WitherSetter<T extends com.foreach.across.modules.web.ui.ViewElement> -
Field Summary
Fields inherited from class com.foreach.across.modules.web.ui.elements.ContainerViewElement
ELEMENT_TYPE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAttributes
(Map<String, Object> attributes) addChild
(com.foreach.across.modules.web.ui.ViewElement element) addChildren
(Collection<? extends com.foreach.across.modules.web.ui.ViewElement> elements) addCssClass
(String... cssClass) addFirstChild
(com.foreach.across.modules.web.ui.ViewElement element) <U extends com.foreach.across.modules.web.ui.ViewElement>
NumericFormElementapplyUnsafe
(Consumer<U> consumer) getAttribute
(String attributeName) <V,
U extends V>
UgetAttribute
(String attributeName, Class<V> expectedType) List<com.foreach.across.modules.web.ui.ViewElement>
getValue()
boolean
hasAttribute
(String attributeName) boolean
hasCssClass
(String cssClass) boolean
boolean
boolean
remove
(com.foreach.across.modules.web.ui.ViewElement.WitherRemover... functions) removeAttribute
(String attributeName) removeCssClass
(String... cssClass) set
(com.foreach.across.modules.web.ui.ViewElement.WitherSetter... setters) setAttribute
(String attributeName, Object attributeValue) setAttributes
(Map<String, Object> attributes) setConfiguration
(@NonNull NumericFormElementConfiguration configuration) setControlName
(String controlName) setCustomTemplate
(String customTemplate) setDisabled
(boolean disabled) protected NumericFormElement
setElementType
(String elementType) setPlaceholder
(String placeholder) setReadonly
(boolean readonly) setRequired
(boolean required) protected NumericFormElement
setTagName
(String tagName) Methods inherited from class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
get, returnIfType
Methods inherited from class com.foreach.across.modules.web.ui.elements.ContainerViewElement
elementStream, find, find, findAll, findAll, findAll, findOrSelf, findOrSelf, flatStream, getCustomTemplate, getElementType, getName, hasChildren, removeAllFromTree, removeChild, removeFromTree, removeFromTree
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.foreach.across.modules.web.ui.ViewElement
get, getCustomTemplate, getElementType, getName, matches
-
Field Details
-
ATTRIBUTE_DATA_NUMERIC
- See Also:
-
CSS_NUMERIC
- See Also:
-
-
Constructor Details
-
NumericFormElement
public NumericFormElement()
-
-
Method Details
-
getControl
- Specified by:
getControl
in interfaceFormControlElement.Proxy
- Returns:
- the actual control
-
getConfiguration
-
setConfiguration
public NumericFormElement setConfiguration(@NonNull @NonNull NumericFormElementConfiguration configuration) -
setPlaceholder
- Specified by:
setPlaceholder
in interfaceConfigurablePlaceholderText
-
getPlaceholder
- Specified by:
getPlaceholder
in interfaceConfigurablePlaceholderText
-
isReadonly
public boolean isReadonly()- Specified by:
isReadonly
in interfaceFormControlElement
- Overrides:
isReadonly
in classFormControlElementSupport
-
setReadonly
- Specified by:
setReadonly
in interfaceFormControlElement
- Overrides:
setReadonly
in classFormControlElementSupport
- Returns:
this
.
-
isRequired
public boolean isRequired()- Specified by:
isRequired
in interfaceFormControlElement
- Overrides:
isRequired
in classFormControlElementSupport
-
setRequired
- Specified by:
setRequired
in interfaceFormControlElement
- Overrides:
setRequired
in classFormControlElementSupport
- Returns:
this
.
-
getControlName
- Specified by:
getControlName
in interfaceFormInputElement
- Overrides:
getControlName
in classFormControlElementSupport
-
setControlName
- Specified by:
setControlName
in interfaceFormInputElement
- Overrides:
setControlName
in classFormControlElementSupport
-
isDisabled
public boolean isDisabled()- Specified by:
isDisabled
in interfaceFormInputElement
- Overrides:
isDisabled
in classFormControlElementSupport
-
setDisabled
- Specified by:
setDisabled
in interfaceFormInputElement
- Overrides:
setDisabled
in classFormControlElementSupport
- Returns:
this
.
-
getTagName
- Specified by:
getTagName
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
getTagName
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
addCssClass
- Specified by:
addCssClass
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
addCssClass
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
hasCssClass
- Specified by:
hasCssClass
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
hasCssClass
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
removeCssClass
- Specified by:
removeCssClass
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
removeCssClass
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
setHtmlId
- Specified by:
setHtmlId
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
setHtmlId
in classFormControlElementSupport
-
getHtmlId
- Specified by:
getHtmlId
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
getHtmlId
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
getAttributes
- Specified by:
getAttributes
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
getAttributes
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
setAttributes
- Specified by:
setAttributes
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
setAttributes
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
setAttribute
- Specified by:
setAttribute
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
setAttribute
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
addAttributes
- Specified by:
addAttributes
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
addAttributes
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
removeAttribute
- Specified by:
removeAttribute
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
removeAttribute
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
getAttribute
- Specified by:
getAttribute
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
getAttribute
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
getAttribute
- Specified by:
getAttribute
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
getAttribute
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
hasAttribute
- Specified by:
hasAttribute
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
hasAttribute
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
getValue
-
setValue
-
getChildren
- Overrides:
getChildren
in classcom.foreach.across.modules.web.ui.elements.ContainerViewElement
-
setName
- Specified by:
setName
in interfacecom.foreach.across.modules.web.ui.MutableViewElement
- Overrides:
setName
in classFormControlElementSupport
-
setCustomTemplate
- Specified by:
setCustomTemplate
in interfacecom.foreach.across.modules.web.ui.MutableViewElement
- Overrides:
setCustomTemplate
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
setElementType
- Overrides:
setElementType
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
addChild
- Overrides:
addChild
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
addChildren
public NumericFormElement addChildren(Collection<? extends com.foreach.across.modules.web.ui.ViewElement> elements) - Overrides:
addChildren
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
addFirstChild
- Overrides:
addFirstChild
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
clearChildren
- Overrides:
clearChildren
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
apply
public NumericFormElement apply(Consumer<com.foreach.across.modules.web.ui.elements.ContainerViewElement> consumer) - Overrides:
apply
in classcom.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 classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
setTagName
- Overrides:
setTagName
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
set
public NumericFormElement set(com.foreach.across.modules.web.ui.ViewElement.WitherSetter... setters) - Specified by:
set
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Specified by:
set
in interfacecom.foreach.across.modules.web.ui.MutableViewElement
- Specified by:
set
in interfacecom.foreach.across.modules.web.ui.ViewElement
- Overrides:
set
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
remove
public NumericFormElement remove(com.foreach.across.modules.web.ui.ViewElement.WitherRemover... functions) - Specified by:
remove
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Specified by:
remove
in interfacecom.foreach.across.modules.web.ui.MutableViewElement
- Specified by:
remove
in interfacecom.foreach.across.modules.web.ui.ViewElement
- Overrides:
remove
in classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-