Package com.helger.html.hc.html.forms
Class AbstractHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
- java.lang.Object
-
- com.helger.html.hc.impl.AbstractHCNode
-
- com.helger.html.hc.html.AbstractHCElement<IMPLTYPE>
-
- com.helger.html.hc.html.forms.AbstractHCControl<IMPLTYPE>
-
- com.helger.html.hc.html.forms.AbstractHCTextArea<IMPLTYPE>
-
- Type Parameters:
IMPLTYPE- The implementing type
- All Implemented Interfaces:
com.helger.commons.hierarchy.IHasChildren<IHCNode>,com.helger.commons.hierarchy.IHasChildrenRecursive<IHCNode>,com.helger.commons.hierarchy.IHasChildrenSorted<IHCNode>,com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>,IHCControl<IMPLTYPE>,IHCHasFocus<IMPLTYPE>,IHCTextArea<IMPLTYPE>,IHCElement<IMPLTYPE>,IHCHasCSSClasses<IMPLTYPE>,IHCHasCSSStyles<IMPLTYPE>,IHCHasState<IMPLTYPE>,IHCHasID<IMPLTYPE>,IHCHasName<IMPLTYPE>,IHCNode,Serializable
- Direct Known Subclasses:
HCTextArea
public abstract class AbstractHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>> extends AbstractHCControl<IMPLTYPE> implements IHCTextArea<IMPLTYPE>
Represents an HTML <textarea> element- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static com.helger.commons.state.ETriStateDEFAULT_AUTO_COMPLETEBy default no auto complete setting is active-
Fields inherited from class com.helger.html.hc.html.forms.AbstractHCControl
CSS_CLASS_READ_ONLY, DEFAULT_AUTO_FOCUS, DEFAULT_DISABLED, DEFAULT_READ_ONLY, DEFAULT_REQUIRED
-
Fields inherited from class com.helger.html.hc.html.AbstractHCElement
DEFAULT_HIDDEN, DEFAULT_SPELLCHECK, DEFAULT_TRANSLATE, DEFAULT_UNFOCUSABLE
-
Fields inherited from interface com.helger.html.hc.html.IHCElement
DEFAULT_TABINDEX
-
-
Constructor Summary
Constructors Constructor Description AbstractHCTextArea()AbstractHCTextArea(IHCRequestField aRF)AbstractHCTextArea(String sName)AbstractHCTextArea(String sName, String sValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfillMicroElement(com.helger.xml.microdom.IMicroElement aElement, IHCConversionSettingsToNode aConversionSettings)Set all attributes and child elements of this objectintgetCols()StringgetDirName()StringgetForm()intgetMaxLength()intgetMinLength()StringgetPlaceholder()StringgetPlainText()intgetRows()StringgetValue()EHCTextAreaWrapgetWrap()booleanisAutoCompleteOff()booleanisAutoCompleteOn()booleanisAutoCompleteUndefined()IMPLTYPEsetAutoComplete(com.helger.commons.state.ETriState eAutoComplete)IMPLTYPEsetCols(int nCols)IMPLTYPEsetDirName(String sDirName)IMPLTYPEsetForm(String sForm)IMPLTYPEsetMaxLength(int nMaxLength)Set the maximum number of characters to be entered.IMPLTYPEsetMinLength(int nMinLength)Set the minimum number of characters to be entered.IMPLTYPEsetPlaceholder(String sPlaceholder)Set the new value for the HTMLplaceholderattribute.IMPLTYPEsetRows(int nRows)IMPLTYPEsetValue(String sValue)IMPLTYPEsetWrap(EHCTextAreaWrap eWrap)StringtoString()-
Methods inherited from class com.helger.html.hc.html.forms.AbstractHCControl
getName, isAutoFocus, isDisabled, isReadOnly, isRequired, onFinalizeNodeState, setAutoFocus, setDisabled, setName, setReadOnly, setRequired
-
Methods inherited from class com.helger.html.hc.html.AbstractHCElement
addClass, addEventHandler, addStyle, containsClass, containsEventHandler, containsStyle, createMicroElement, customAttrs, finishMicroElement, getAccessKey, getAllClasses, getAllClassesAsString, getAllClassNames, getAllStyles, getAllStylesAsString, getAllStyleValues, getContentEditable, getDirection, getDraggable, getElement, getEventHandler, getEventMap, getID, getLanguage, getRole, getStyleValue, getTabIndex, getTagName, getTitle, getTranslate, hasAnyClass, hasAnyStyle, hasStyle, internalConvertToMicroNode, isHidden, isSpellCheck, isTranslateOff, isTranslateOn, isTranslateUndefined, isUnfocusable, isValidID, onConsistencyCheck, prependEventHandler, removeAllClasses, removeAllEventHandler, removeAllStyles, removeClass, removeStyle, setAccessKey, setContentEditable, setDirection, setDraggable, setEventHandler, setHidden, setID, setID, setLanguage, setRole, setSpellCheck, setTabIndex, setTitle, setTranslate, setUnfocusable
-
Methods inherited from class com.helger.html.hc.impl.AbstractHCNode
canConvertToMicroNode, consistencyCheck, convertToMicroNode, customizeNode, finalizeNodeState, findFirstChild, findFirstChildMapped, forAllChildren, forAllChildren, forAllChildrenBreakable, forAllChildrenMapped, getAllChildren, getChildAtIndex, getChildCount, getChildren, getFirstChild, getLastChild, getNodeState, hasChildren, internalSetNodeState, onCustomizeNode, onRegisterExternalResources, registerExternalResources
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildren
forAllChildren, forAllChildren, forAllChildrenBreakable, forAllChildrenMapped, getChildCount, getChildren, hasChildren, hasNoChildren
-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildrenRecursive
forAllChildrenRecursive, forAllChildrenRecursive
-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildrenSorted
findFirstChild, findFirstChildMapped, getAllChildren, getChildAtIndex, getFirstChild, getLastChild
-
Methods inherited from interface com.helger.html.hc.html.forms.IHCControl
isReadOnly, isRequired, setReadOnly, setRequired
-
Methods inherited from interface com.helger.html.hc.html.IHCElement
addEventHandler, containsEventHandler, customAttrs, getAccessKey, getContentEditable, getDirection, getDraggable, getElement, getEventHandler, getEventMap, getLanguage, getRole, getTabIndex, getTagName, getTitle, getTranslate, isHidden, isSpellCheck, isTranslateOff, isTranslateOn, isTranslateUndefined, isUnfocusable, prependEventHandler, removeAllEventHandler, setAccessKey, setContentEditable, setDirection, setDraggable, setEventHandler, setHidden, setLanguage, setRole, setSpellCheck, setTabIndex, setTitle, setTranslate, setTranslate, setUnfocusable, withCustomAttrs
-
Methods inherited from interface com.helger.html.hc.html.IHCHasCSSClasses
addClass, addClasses, addClasses, addClasses, containsClass, getAllClasses, getAllClassesAsString, getAllClassNames, hasAnyClass, removeAllClasses, removeClass
-
Methods inherited from interface com.helger.html.hc.html.IHCHasCSSStyles
addStyle, addStyle, addStyles, addStyles, addStyles, containsStyle, getAllStyles, getAllStylesAsString, getAllStyleValues, getStyleValue, hasAnyStyle, hasStyle, removeAllStyles, removeStyle
-
Methods inherited from interface com.helger.html.hc.IHCHasID
ensureID, getID, hasID, hasNoID, setID, setUniqueID
-
Methods inherited from interface com.helger.html.hc.IHCHasName
getName, setName
-
Methods inherited from interface com.helger.html.hc.html.IHCHasState
isDisabled, setDisabled
-
Methods inherited from interface com.helger.html.hc.IHCNode
canConvertToMicroNode, consistencyCheck, convertToMicroNode, customizeNode, finalizeNodeState, getNodeState, registerExternalResources
-
Methods inherited from interface com.helger.html.hc.html.forms.IHCTextArea
hasPlaceholder, isAutoFocus, setAutoComplete, setAutoFocus
-
-
-
-
Constructor Detail
-
AbstractHCTextArea
public AbstractHCTextArea()
-
AbstractHCTextArea
public AbstractHCTextArea(@Nonnull IHCRequestField aRF)
-
-
Method Detail
-
isAutoCompleteOn
public final boolean isAutoCompleteOn()
- Specified by:
isAutoCompleteOnin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
isAutoCompleteOff
public final boolean isAutoCompleteOff()
- Specified by:
isAutoCompleteOffin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
isAutoCompleteUndefined
public final boolean isAutoCompleteUndefined()
- Specified by:
isAutoCompleteUndefinedin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
setAutoComplete
@Nonnull public final IMPLTYPE setAutoComplete(@Nonnull com.helger.commons.state.ETriState eAutoComplete)
- Specified by:
setAutoCompletein interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
getCols
public final int getCols()
- Specified by:
getColsin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
setCols
@Nonnull public final IMPLTYPE setCols(int nCols)
- Specified by:
setColsin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
getDirName
@Nullable public final String getDirName()
- Specified by:
getDirNamein interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
setDirName
@Nonnull public final IMPLTYPE setDirName(@Nullable String sDirName)
- Specified by:
setDirNamein interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
getForm
@Nullable public final String getForm()
- Specified by:
getFormin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
setForm
@Nonnull public final IMPLTYPE setForm(@Nullable String sForm)
- Specified by:
setFormin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
getMaxLength
public final int getMaxLength()
- Specified by:
getMaxLengthin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>- Returns:
- The currently set max length or -1.
-
setMaxLength
@Nonnull public final IMPLTYPE setMaxLength(int nMaxLength)
Description copied from interface:IHCTextAreaSet the maximum number of characters to be entered.- Specified by:
setMaxLengthin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>- Parameters:
nMaxLength- The max length. Should be > 0.- Returns:
- this
-
getMinLength
public final int getMinLength()
- Specified by:
getMinLengthin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>- Returns:
- The currently set min length or -1.
-
setMinLength
@Nonnull public final IMPLTYPE setMinLength(int nMinLength)
Description copied from interface:IHCTextAreaSet the minimum number of characters to be entered.- Specified by:
setMinLengthin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>- Parameters:
nMinLength- The min length. Should be > 0.- Returns:
- this
-
getPlaceholder
@Nullable public final String getPlaceholder()
- Specified by:
getPlaceholderin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>- Returns:
- The current value of the HTML
placeholderattribute. May benull.
-
setPlaceholder
@Nonnull public final IMPLTYPE setPlaceholder(@Nullable String sPlaceholder)
Description copied from interface:IHCTextAreaSet the new value for the HTMLplaceholderattribute.- Specified by:
setPlaceholderin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>- Parameters:
sPlaceholder- The new value. May benull.- Returns:
- this
-
getRows
public final int getRows()
- Specified by:
getRowsin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
setRows
@Nonnull public final IMPLTYPE setRows(int nRows)
- Specified by:
setRowsin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
getValue
@Nullable public final String getValue()
- Specified by:
getValuein interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
setValue
@Nonnull public final IMPLTYPE setValue(@Nullable String sValue)
- Specified by:
setValuein interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
getWrap
@Nullable public final EHCTextAreaWrap getWrap()
- Specified by:
getWrapin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
setWrap
@Nonnull public final IMPLTYPE setWrap(@Nullable EHCTextAreaWrap eWrap)
- Specified by:
setWrapin interfaceIHCTextArea<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
getPlainText
@Nonnull public String getPlainText()
- Specified by:
getPlainTextin interfaceIHCNode- Overrides:
getPlainTextin classAbstractHCNode- Returns:
- The plain text representation of this text. May not be
null.
-
fillMicroElement
@OverridingMethodsMustInvokeSuper protected void fillMicroElement(com.helger.xml.microdom.IMicroElement aElement, IHCConversionSettingsToNode aConversionSettings)
Description copied from class:AbstractHCElementSet all attributes and child elements of this object- Overrides:
fillMicroElementin classAbstractHCControl<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>- Parameters:
aElement- The current micro element to be filled. Nevernull.aConversionSettings- The conversion settings to be used. Nevernull.
-
toString
public String toString()
- Overrides:
toStringin classAbstractHCControl<IMPLTYPE extends AbstractHCTextArea<IMPLTYPE>>
-
-