doc.api.au.id.jericho.lib.html.FormControl.html Maven / Gradle / Ivy
FormControl (Jericho HTML Parser 1.5-dev1)
Package
Class
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
au.id.jericho.lib.html
Class FormControl
java.lang.Object
au.id.jericho.lib.html.Segment
au.id.jericho.lib.html.FormControl
- All Implemented Interfaces:
- java.lang.CharSequence, java.lang.Comparable
- public abstract class FormControl
- extends Segment
Method Summary
abstract boolean
addValue(java.lang.CharSequence value)
void
clearValues()
java.util.Map
getAttributesMap()
java.lang.String
getDebugInfo()
Returns a string representation of this object useful for debugging purposes.
Element
getElement()
FormControlType
getFormControlType()
java.lang.String
getName()
java.util.Iterator
getOptionElementIterator()
FormControlOutputStyle
getOutputStyle()
java.lang.String
getPredefinedValue()
Returns the initial value of this control if it has a predefined value.
java.util.Collection
getPredefinedValues()
Returns a collection of all predefined values in this control.
boolean
isChecked()
boolean
isDisabled()
void
setDisabled(boolean disabled)
void
setOutputStyle(FormControlOutputStyle outputStyle)
Methods inherited from class au.id.jericho.lib.html.Segment
charAt, compareTo, encloses, encloses, equals, findAllCharacterReferences, findAllComments, findAllElements, findAllElements, findAllStartTags, findAllStartTags, findAllStartTags, findFormControls, findFormFields, findWords, getBegin, getEnd, getSourceText, getSourceTextNoWhitespace, hashCode, ignoreWhenParsing, isComment, isWhiteSpace, length, parseAttributes, subSequence, toString
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
Method Detail
getFormControlType
public final FormControlType getFormControlType()
getName
public final java.lang.String getName()
getElement
public final Element getElement()
getOptionElementIterator
public java.util.Iterator getOptionElementIterator()
getOutputStyle
public FormControlOutputStyle getOutputStyle()
setOutputStyle
public void setOutputStyle(FormControlOutputStyle outputStyle)
getAttributesMap
public final java.util.Map getAttributesMap()
isDisabled
public final boolean isDisabled()
setDisabled
public final void setDisabled(boolean disabled)
isChecked
public boolean isChecked()
getPredefinedValue
public java.lang.String getPredefinedValue()
- Returns the initial value of this control if it has a predefined value.
This method throws a java.lang.UnsupportedOperationException
if called on a select
control
since they typically contain multiple predefined values rather than just one.
In this case the getPredefinedValues()
method should be used instead
to get a collection of all the predefined values.
- Returns:
- the initial value of this control if it has a predefined value, or
null
if none.
getPredefinedValues
public java.util.Collection getPredefinedValues()
- Returns a collection of all predefined values in this control.
This method is most useful for select
controls since they typically contain multiple predefined values.
In other controls it will return a collection with zero or one item based on the output of the
getPredefinedValue()
method, so for better efficiency it is recommended to use the
getPredefinedValue()
method instead.
The multiple predefined values of a select
control are defined by the option
elements within it.
Each option
element has a
initial value
defined by the value of its value
attribute, or if this attribute is not present, by its
decoded content text
with collapsed white space.
The CharacterReference.decodeCollapseWhiteSpace(CharSequence)
method internally provides the necessary
conversion of the content text for this purpose.
- Returns:
- a collection of all predefined values in this control, guaranteed not
null
. - See Also:
FormField.getPredefinedValues()
clearValues
public final void clearValues()
addValue
public abstract boolean addValue(java.lang.CharSequence value)
getDebugInfo
public java.lang.String getDebugInfo()
- Description copied from class:
Segment
- Returns a string representation of this object useful for debugging purposes.
- Overrides:
getDebugInfo
in class Segment
- Returns:
- a string representation of this object useful for debugging purposes.
Package
Class
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD