Package org.lobobrowser.html.domimpl
Class HTMLInputElementImpl
- java.lang.Object
-
- All Implemented Interfaces:
ModelNode
,CSS2PropertiesContext
,ScriptableDelegate
,org.w3c.dom.Element
,HTMLElement
,HTMLInputElement
,org.w3c.dom.Node
public class HTMLInputElementImpl extends HTMLBaseInputElement implements HTMLInputElement
-
-
Field Summary
-
Fields inherited from class org.lobobrowser.html.domimpl.HTMLBaseInputElement
deferredValue, inputContext
-
Fields inherited from class org.lobobrowser.html.domimpl.ElementImpl
attributes
-
Fields inherited from class org.lobobrowser.html.domimpl.NodeImpl
document, logger, nodeList, notificationsSuspended, parentNode, treeLock, uiNode
-
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
-
Constructor Summary
Constructors Constructor Description HTMLInputElementImpl(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
click()
Simulate a mouse-click.boolean
getChecked()
When thetype
attribute of the element has the value "radio" or "checkbox", this represents the current state of the form control, in an interactive user agent.boolean
getDefaultChecked()
Whentype
has the value "radio" or "checkbox", this represents the HTML checked attribute of the element.protected FormInput[]
getFormInputs()
Gets form input due to the current element.int
getMaxLength()
Maximum number of characters for text fields, whentype
has the value "text" or "password".int
getSize()
Size information.java.lang.String
getSrc()
When thetype
attribute has the value "image", this attribute specifies the location of the image to be used to decorate the graphical submit button.java.lang.String
getType()
Gets input type in lowercase.java.lang.String
getUseMap()
Use client-side image map.boolean
isImageInput()
boolean
isResetInput()
boolean
isSubmitInput()
boolean
isSubmittableWithEnterKey()
boolean
isSubmittableWithPress()
void
setChecked(boolean checked)
When thetype
attribute of the element has the value "radio" or "checkbox", this represents the current state of the form control, in an interactive user agent.void
setDefaultChecked(boolean defaultChecked)
Whentype
has the value "radio" or "checkbox", this represents the HTML checked attribute of the element.void
setMaxLength(int maxLength)
Maximum number of characters for text fields, whentype
has the value "text" or "password".void
setSize(int size)
Size information.void
setSrc(java.lang.String src)
When thetype
attribute has the value "image", this attribute specifies the location of the image to be used to decorate the graphical submit button.void
setType(java.lang.String type)
The type of control created (all lower case).void
setUseMap(java.lang.String useMap)
Use client-side image map.-
Methods inherited from class org.lobobrowser.html.domimpl.HTMLBaseInputElement
addImageListener, assignAttributeField, blur, focus, getAccept, getAccessKey, getAlign, getAlt, getDefaultValue, getDisabled, getFileValue, getForm, getImage, getName, getOnload, getReadOnly, getTabIndex, getValue, removeImageListener, resetForm, select, setAccept, setAccessKey, setAlign, setAlt, setDefaultValue, setDisabled, setInputContext, setName, setOnload, setReadOnly, setTabIndex, setValue, submitForm
-
Methods inherited from class org.lobobrowser.html.domimpl.HTMLAbstractUIElement
getEventFunction, getOnblur, getOnclick, getOncontextmenu, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, setOnblur, setOnclick, setOncontextmenu, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup
-
Methods inherited from class org.lobobrowser.html.domimpl.HTMLElementImpl
addStyleSheetDeclarations, appendOuterHTMLImpl, createDefaultStyleSheet, createRenderState, findStyleDeclarations, forgetLocalStyle, forgetStyle, getAncestor, getAncestorForJavaClass, getAncestorWithClass, getAncestorWithId, getAttributeAsBoolean, getAttributeAsInt, getCharset, getClassName, getComputedStyle, getCssInputSourceForDecl, getCurrentStyle, getDocumentBaseURI, getOffsetHeight, getOffsetLeft, getOffsetTop, getOffsetWidth, getOuterHTML, getParent, getParentStyle, getParentWithClass, getParentWithId, getPreceedingSibling, getPreceedingSiblingElement, getPreceedingSiblingWithClass, getPreceedingSiblingWithId, getPseudoNames, getStyle, informInvalid, informInvalidAttibute, setCharset, setClassName, setCurrentStyle, setInnerHTML, setMouseOver, setStyle, toString, warn, warn
-
Methods inherited from class org.lobobrowser.html.domimpl.ElementImpl
createSimilarNode, equalAttributes, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDir, getElementsByTagName, getElementsByTagNameNS, getId, getLang, getLocalName, getNodeName, getNodeType, getNodeValue, getRawInnerText, getSchemaTypeInfo, getTagName, getTitle, hasAttribute, hasAttributeNS, hasAttributes, htmlEncodeChildText, isTagName, normalizeAttributeName, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeImpl, setAttributeNode, setAttributeNodeNS, setAttributeNS, setDir, setId, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setInnerText, setLang, setNodeValue, setTitle
-
Methods inherited from class org.lobobrowser.html.domimpl.NodeImpl
appendChild, appendInnerHTMLImpl, appendInnerTextImpl, cloneNode, compareDocumentPosition, findUINode, forgetRenderState, getAlignmentX, getAlignmentY, getBaseURI, getChildNodes, getChildren, getChildrenArray, getDescendents, getDocumentItem, getDocumentURL, getFeature, getFirstChild, getFullURL, getHtmlRendererContext, getInnerHTML, getInnerText, getLastChild, getNamespaceURI, getNextSibling, getNodeList, getOwnerDocument, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousSibling, getRenderState, getTextContent, getUINode, getUserAgentContext, getUserData, hasChildNodes, informDocumentInvalid, informExternalScriptLoading, informLayoutInvalid, informLookInvalid, informNodeLoaded, informPositionInvalid, informSizeInvalid, informStructureInvalid, insertAfter, insertAt, insertBefore, isDefaultNamespace, isEqualNode, isEqualOrDescendentOf, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeAllChildren, removeAllChildrenImpl, removeChild, removeChildAt, removeChildren, removeChildrenImpl, replaceAdjacentTextNodes, replaceAdjacentTextNodes, replaceChild, setDocumentItem, setPrefix, setTextContent, setUINode, setUserData
-
Methods inherited from class org.lobobrowser.js.AbstractScriptableDelegate
getScriptable, setScriptable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.lobobrowser.html.style.CSS2PropertiesContext
informLayoutInvalid, informLookInvalid, informPositionInvalid, informSizeInvalid
-
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
-
Methods inherited from interface org.w3c.dom.html2.HTMLElement
getClassName, getDir, getId, getLang, getTitle, setClassName, setDir, setId, setLang, setTitle
-
Methods inherited from interface org.w3c.dom.html2.HTMLInputElement
blur, focus, getAccept, getAccessKey, getAlign, getAlt, getDefaultValue, getDisabled, getForm, getName, getReadOnly, getTabIndex, getValue, select, setAccept, setAccessKey, setAlign, setAlt, setDefaultValue, setDisabled, setName, setReadOnly, setTabIndex, setValue
-
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
-
-
-
Method Detail
-
getDefaultChecked
public boolean getDefaultChecked()
Description copied from interface:HTMLInputElement
Whentype
has the value "radio" or "checkbox", this represents the HTML checked attribute of the element. The value of this attribute does not change if the state of the corresponding form control, in an interactive user agent, changes. See the checked attribute definition in HTML 4.01.- Specified by:
getDefaultChecked
in interfaceHTMLInputElement
-
setDefaultChecked
public void setDefaultChecked(boolean defaultChecked)
Description copied from interface:HTMLInputElement
Whentype
has the value "radio" or "checkbox", this represents the HTML checked attribute of the element. The value of this attribute does not change if the state of the corresponding form control, in an interactive user agent, changes. See the checked attribute definition in HTML 4.01.- Specified by:
setDefaultChecked
in interfaceHTMLInputElement
-
getChecked
public boolean getChecked()
Description copied from interface:HTMLInputElement
When thetype
attribute of the element has the value "radio" or "checkbox", this represents the current state of the form control, in an interactive user agent. Changes to this attribute change the state of the form control, but do not change the value of the HTML checked attribute of the INPUT element.During the handling of a click event on an input element with a type attribute that has the value "radio" or "checkbox", some implementations may change the value of this property before the event is being dispatched in the document. If the default action of the event is canceled, the value of the property may be changed back to its original value. This means that the value of this property during the handling of click events is implementation dependent.- Specified by:
getChecked
in interfaceHTMLInputElement
-
setChecked
public void setChecked(boolean checked)
Description copied from interface:HTMLInputElement
When thetype
attribute of the element has the value "radio" or "checkbox", this represents the current state of the form control, in an interactive user agent. Changes to this attribute change the state of the form control, but do not change the value of the HTML checked attribute of the INPUT element.During the handling of a click event on an input element with a type attribute that has the value "radio" or "checkbox", some implementations may change the value of this property before the event is being dispatched in the document. If the default action of the event is canceled, the value of the property may be changed back to its original value. This means that the value of this property during the handling of click events is implementation dependent.- Specified by:
setChecked
in interfaceHTMLInputElement
-
getMaxLength
public int getMaxLength()
Description copied from interface:HTMLInputElement
Maximum number of characters for text fields, whentype
has the value "text" or "password". See the maxlength attribute definition in HTML 4.01.- Specified by:
getMaxLength
in interfaceHTMLInputElement
-
setMaxLength
public void setMaxLength(int maxLength)
Description copied from interface:HTMLInputElement
Maximum number of characters for text fields, whentype
has the value "text" or "password". See the maxlength attribute definition in HTML 4.01.- Specified by:
setMaxLength
in interfaceHTMLInputElement
-
getSize
public int getSize()
Description copied from interface:HTMLInputElement
Size information. The precise meaning is specific to each type of field. See the size attribute definition in HTML 4.01.- Specified by:
getSize
in interfaceHTMLInputElement
-
setSize
public void setSize(int size)
Description copied from interface:HTMLInputElement
Size information. The precise meaning is specific to each type of field. See the size attribute definition in HTML 4.01.- Specified by:
setSize
in interfaceHTMLInputElement
-
getSrc
public java.lang.String getSrc()
Description copied from interface:HTMLInputElement
When thetype
attribute has the value "image", this attribute specifies the location of the image to be used to decorate the graphical submit button. See the src attribute definition in HTML 4.01.- Specified by:
getSrc
in interfaceHTMLInputElement
-
setSrc
public void setSrc(java.lang.String src)
Description copied from interface:HTMLInputElement
When thetype
attribute has the value "image", this attribute specifies the location of the image to be used to decorate the graphical submit button. See the src attribute definition in HTML 4.01.- Specified by:
setSrc
in interfaceHTMLInputElement
-
getType
public java.lang.String getType()
Gets input type in lowercase.- Specified by:
getType
in interfaceHTMLInputElement
-
setType
public void setType(java.lang.String type)
Description copied from interface:HTMLInputElement
The type of control created (all lower case). See the type attribute definition in HTML 4.01.- Specified by:
setType
in interfaceHTMLInputElement
-
getUseMap
public java.lang.String getUseMap()
Description copied from interface:HTMLInputElement
Use client-side image map. See the usemap attribute definition in HTML 4.01.- Specified by:
getUseMap
in interfaceHTMLInputElement
-
setUseMap
public void setUseMap(java.lang.String useMap)
Description copied from interface:HTMLInputElement
Use client-side image map. See the usemap attribute definition in HTML 4.01.- Specified by:
setUseMap
in interfaceHTMLInputElement
-
click
public void click()
Description copied from interface:HTMLInputElement
Simulate a mouse-click. ForINPUT
elements whosetype
attribute has one of the following values: "button", "checkbox", "radio", "reset", or "submit".- Specified by:
click
in interfaceHTMLInputElement
-
isSubmittableWithEnterKey
public boolean isSubmittableWithEnterKey()
-
isSubmittableWithPress
public boolean isSubmittableWithPress()
-
isSubmitInput
public boolean isSubmitInput()
-
isImageInput
public boolean isImageInput()
-
isResetInput
public boolean isResetInput()
-
getFormInputs
protected FormInput[] getFormInputs()
Description copied from class:HTMLElementImpl
Gets form input due to the current element. It should returnnull
except when the element is a form input element.- Overrides:
getFormInputs
in classHTMLElementImpl
-
-