ice.pilots.html4
Class DInputElement

java.lang.Object
  extended byice.storm.DynamicObject
      extended byice.pilots.html4.DNode
          extended byice.pilots.html4.DElement
              extended byice.pilots.html4.FormTypeElement
                  extended byice.pilots.html4.DInputElement
All Implemented Interfaces:
Cloneable, Element, ElementCSSInlineStyle, EventTarget, HTMLElement, HTMLInputElement, Node

public class DInputElement
extends ice.pilots.html4.FormTypeElement
implements HTMLInputElement


Field Summary
static int DEFAULT_MAX_LENGTH
           
static int DEFAULT_SIZE
           
protected  DFormElement hackForm
           
 
Fields inherited from class ice.pilots.html4.DNode
doc, first, last, next, parent, prev
 
Fields inherited from class ice.storm.DynamicObject
NOT_FOUND, SETD_IGNORE, SETD_NOT_FOUND, SETD_OK
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
protected DInputElement(DDocument doc, int id)
           
 
Method Summary
 void blur()
          Removes keyboard focus from this element.
 void click()
          Simulate a mouse-click.
 void dispatchChange()
           
 boolean dispatchEvent(Event event)
          This method allows the dispatch of events into the implementations event model.
 void dispatchSelection(int start, int end)
           
 Object execDynamicMethod(String name, Object[] args, DynEnv env)
          Perform function-like actions for `name' with the given args.
protected  String fixValue(String value)
           
 void focus()
          Gives keyboard focus to this element.
 String getAccept()
          A comma-separated list of content types that a server processing this form will handle correctly.
 String getAccessKey()
          A single character access key to give access to the form control.
 String getAlign()
          Aligns this object (vertically or horizontally) with respect to its surrounding text.
 String getAlt()
          Alternate text for user agents not rendering the normal content of this element.
 boolean getChecked()
          When the type 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()
          When type has the value "Radio" or "Checkbox", this represents the HTML checked attribute of the element.
 String getDefaultValue()
          When the type attribute of the element has the value "Text", "File" or "Password", this represents the HTML value attribute of the element.
 DFormElement getDForm()
           
 boolean getDisabled()
          The control is unavailable in this context.
 Object getDynamicValue(String name, DynEnv env)
          Returns the `key' field or Defs.NOT_FOUND if `name' does not exist.
 HTMLFormElement getForm()
          Returns the FORM element containing this control.
 int getMaxLength()
          Maximum number of characters for text fields, when type has the value "Text" or "Password".
 boolean getReadOnly()
          This control is read-only.
 String getSize()
          Size information.
 String getSrc()
          When the type attribute has the value "Image", this attribute specifies the location of the image to be used to decorate the graphical submit button.
 int getTabIndex()
          Index that represents the element's position in the tabbing order.
 String getType()
          The type of control created.
 String getUseMap()
          Use client-side image map.
 String getValue()
          When the type attribute of the element has the value "Text", "File" or "Password", this represents the current contents of the corresponding form control, in an interactive user agent.
protected  void onDAttrValueChange(DAttr attr)
           
 void select()
          Select the contents of the text area.
 void setAccept(String accept)
           
 void setAccessKey(String accessKey)
           
 void setAlign(String align)
           
 void setAlt(String alt)
           
protected  void setAttribute(int attrNameId, String value)
           
 void setAttribute(String name, String value)
          Adds a new attribute.
 void setChecked(boolean checked)
           
 void setDefaultChecked(boolean defaultChecked)
           
 void setDefaultValue(String defaultValue)
           
 void setDisabled(boolean disabled)
           
 int setDynamicValue(String name, Object value, DynEnv env)
          Set field `name' to `value'.
 void setMaxLength(int maxLength)
           
 void setReadOnly(boolean readOnly)
           
 void setSize(String size)
           
 void setSrc(String src)
           
 void setTabIndex(int tabIndex)
           
 void setType(String type)
          TODO
 void setUseMap(String useMap)
           
 void setValue(String value)
           
 
Methods inherited from class ice.pilots.html4.DElement
afterClone, attrNameToId, getAttribute, getAttribute, getAttributeAsInt, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getBgColor, getChildViewport, getClassName, getClientLeft, getClientTop, getClientWidth, getColor, getDir, getElementsByTagName, getElementsByTagNameNS, getEmbeddedDocument, getEmbeddedViewHolder, getId, getInnerHTML, getLang, getLocalName, getName, getNamespaceURI, getNodeName, getNodeType, getOuterHTML, getPrefix, getStyle, getSynthetic, getTagName, getTitle, hasAttribute, hasAttributeNS, insertAdjacentHTML, removeAttribute, removeAttributeNode, removeAttributeNS, removeNode, setAttributeNode, setAttributeNodeNS, setAttributeNS, setBgColor, setClassName, setColor, setCols, setDir, setId, setInnerHTML, setLang, setName, setOuterHTML, setRows, setTitle, swapDNode, swapNode, toString
 
Methods inherited from class ice.pilots.html4.DNode
addEventListener, appendChild, appendDChild, clone, clone, cloneNode, contains, deleteSlot, getAll, getChildNodes, getDAttr, getDAttrCount, getDAttrFromIndex, getDAttrListHead, getDAttrValueOrNull, getDParent, getDynamicScopeParent, getFirstChild, getFirstDChild, getInnerText, getLastChild, getLastDChild, getNameId, getNextDSibling, getNextSibling, getNodeValue, getOuterText, getOwnerDDocument, getOwnerDocument, getParentDNode, getParentNode, getPilot, getPreviousDSibling, getPreviousSibling, getRootDNode, getRootNode, getSlot, hasAttributes, hasChildNodes, hasSlot, insertBefore, insertDChildBefore, isSupported, normalize, removeAllDAttrs, removeChild, removeDAttr, removeDAttr, removeDChild, removeEventListener, replaceChild, replaceDChild, setDAttr, setDAttr, setInnerText, setNodeValue, setOuterText, setParent, setPrefix, setSlot, unlinkAllSlots
 
Methods inherited from class ice.storm.DynamicObject
deleteSlot, getEnumeratableIds, getMethodPropertySource, getScriptDataLock, getScriptWrapper, getSlot, hasSlot, javaReflectionTarget, readOnlySlots, script_toSource, script_toString, setScriptWrapperIfAbsent, setSlot
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.html.HTMLInputElement
getForm, getName, setName
 
Methods inherited from interface org.w3c.dom.html.HTMLElement
getClassName, getDir, getId, getLang, getTitle, setClassName, setDir, setId, setLang, setTitle
 
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttributeNode, setAttributeNodeNS, setAttributeNS
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Field Detail

DEFAULT_MAX_LENGTH

public static final int DEFAULT_MAX_LENGTH
See Also:
Constant Field Values

DEFAULT_SIZE

public static final int DEFAULT_SIZE
See Also:
Constant Field Values

hackForm

protected DFormElement hackForm
Constructor Detail

DInputElement

protected DInputElement(DDocument doc,
                        int id)
Method Detail

setAttribute

public void setAttribute(String name,
                         String value)
Description copied from interface: Element
Adds a new attribute. If an attribute with that name is already present in the element, its value is changed to be that of the value parameter. This value is a simple string; it is not parsed as it is being set. So any markup (such as syntax to be recognized as an entity reference) is treated as literal text, and needs to be appropriately escaped by the implementation when it is written out. In order to assign an attribute value that contains entity references, the user must create an Attr node plus any Text and EntityReference nodes, build the appropriate subtree, and use setAttributeNode to assign it as the value of an attribute.
To set an attribute with a qualified name and namespace URI, use the setAttributeNS method.

Specified by:
setAttribute in interface Element
Overrides:
setAttribute in class DElement

setAttribute

protected void setAttribute(int attrNameId,
                            String value)
Overrides:
setAttribute in class DElement

onDAttrValueChange

protected void onDAttrValueChange(DAttr attr)
Overrides:
onDAttrValueChange in class DElement

dispatchChange

public void dispatchChange()

dispatchEvent

public boolean dispatchEvent(Event event)
Description copied from interface: EventTarget
This method allows the dispatch of events into the implementations event model. Events dispatched in this manner will have the same capturing and bubbling behavior as events dispatched directly by the implementation. The target of the event is the EventTarget on which dispatchEvent is called.

Specified by:
dispatchEvent in interface EventTarget
Overrides:
dispatchEvent in class DNode

getDefaultValue

public String getDefaultValue()
Description copied from interface: HTMLInputElement
When the type attribute of the element has the value "Text", "File" or "Password", this represents the HTML value attribute of the element. The value of this attribute does not change if the contents of the corresponding form control, in an interactive user agent, changes. Changing this attribute, however, resets the contents of the form control. See the value attribute definition in HTML 4.0.

Specified by:
getDefaultValue in interface HTMLInputElement

setDefaultValue

public void setDefaultValue(String defaultValue)
Specified by:
setDefaultValue in interface HTMLInputElement

getDefaultChecked

public boolean getDefaultChecked()
Description copied from interface: HTMLInputElement
When type 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. Changes to this attribute, however, resets the state of the form control. See the checked attribute definition in HTML 4.0.

Specified by:
getDefaultChecked in interface HTMLInputElement

setDefaultChecked

public void setDefaultChecked(boolean defaultChecked)
Specified by:
setDefaultChecked in interface HTMLInputElement

getAccept

public String getAccept()
Description copied from interface: HTMLInputElement
A comma-separated list of content types that a server processing this form will handle correctly. See the accept attribute definition in HTML 4.0.

Specified by:
getAccept in interface HTMLInputElement

setAccept

public void setAccept(String accept)
Specified by:
setAccept in interface HTMLInputElement

getAccessKey

public String getAccessKey()
Description copied from interface: HTMLInputElement
A single character access key to give access to the form control. See the accesskey attribute definition in HTML 4.0.

Specified by:
getAccessKey in interface HTMLInputElement

setAccessKey

public void setAccessKey(String accessKey)
Specified by:
setAccessKey in interface HTMLInputElement

getAlt

public String getAlt()
Description copied from interface: HTMLInputElement
Alternate text for user agents not rendering the normal content of this element. See the alt attribute definition in HTML 4.0.

Specified by:
getAlt in interface HTMLInputElement

setAlt

public void setAlt(String alt)
Specified by:
setAlt in interface HTMLInputElement

getChecked

public boolean getChecked()
Description copied from interface: HTMLInputElement
When the type 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 value attribute of the element.

Specified by:
getChecked in interface HTMLInputElement

setChecked

public void setChecked(boolean checked)
Specified by:
setChecked in interface HTMLInputElement

getDisabled

public boolean getDisabled()
Description copied from interface: HTMLInputElement
The control is unavailable in this context. See the disabled attribute definition in HTML 4.0.

Specified by:
getDisabled in interface HTMLInputElement

setDisabled

public void setDisabled(boolean disabled)
Specified by:
setDisabled in interface HTMLInputElement

getMaxLength

public int getMaxLength()
Description copied from interface: HTMLInputElement
Maximum number of characters for text fields, when type has the value "Text" or "Password". See the maxlength attribute definition in HTML 4.0.

Specified by:
getMaxLength in interface HTMLInputElement

setMaxLength

public void setMaxLength(int maxLength)
Specified by:
setMaxLength in interface HTMLInputElement

getReadOnly

public boolean getReadOnly()
Description copied from interface: HTMLInputElement
This control is read-only. Relevant only when type has the value "Text" or "Password". See the readonly attribute definition in HTML 4.0.

Specified by:
getReadOnly in interface HTMLInputElement

setReadOnly

public void setReadOnly(boolean readOnly)
Specified by:
setReadOnly in interface HTMLInputElement

getSize

public String 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.0.

Specified by:
getSize in interface HTMLInputElement

setSize

public void setSize(String size)
Specified by:
setSize in interface HTMLInputElement

getSrc

public String getSrc()
Description copied from interface: HTMLInputElement
When the type 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.0.

Specified by:
getSrc in interface HTMLInputElement

setSrc

public void setSrc(String src)
Specified by:
setSrc in interface HTMLInputElement

getTabIndex

public int getTabIndex()
Description copied from interface: HTMLInputElement
Index that represents the element's position in the tabbing order. See the tabindex attribute definition in HTML 4.0.

Specified by:
getTabIndex in interface HTMLInputElement

setTabIndex

public void setTabIndex(int tabIndex)
Specified by:
setTabIndex in interface HTMLInputElement

getType

public String getType()
Description copied from interface: HTMLInputElement
The type of control created. See the type attribute definition in HTML 4.0.

Specified by:
getType in interface HTMLInputElement

setType

public void setType(String type)
TODO

Specified by:
setType in interface HTMLInputElement

getUseMap

public String getUseMap()
Description copied from interface: HTMLInputElement
Use client-side image map. See the usemap attribute definition in HTML 4.0.

Specified by:
getUseMap in interface HTMLInputElement

setUseMap

public void setUseMap(String useMap)
Specified by:
setUseMap in interface HTMLInputElement

getValue

public String getValue()
Description copied from interface: HTMLInputElement
When the type attribute of the element has the value "Text", "File" or "Password", this represents the current contents of the corresponding form control, in an interactive user agent. Changing this attribute changes the contents of the form control, but does not change the value of the HTML value attribute of the element. When the type attribute of the element has the value "Button", "Hidden", "Submit", "Reset", "Image", "Checkbox" or "Radio", this represents the HTML value attribute of the element. See the value attribute definition in HTML 4.0.

Specified by:
getValue in interface HTMLInputElement

setValue

public void setValue(String value)
Specified by:
setValue in interface HTMLInputElement

dispatchSelection

public void dispatchSelection(int start,
                              int end)

blur

public void blur()
Description copied from interface: HTMLInputElement
Removes keyboard focus from this element.

Specified by:
blur in interface HTMLInputElement

focus

public void focus()
Description copied from interface: HTMLInputElement
Gives keyboard focus to this element.

Specified by:
focus in interface HTMLInputElement

select

public void select()
Description copied from interface: HTMLInputElement
Select the contents of the text area. For INPUT elements whose type attribute has one of the following values: "Text", "File", or "Password".

Specified by:
select in interface HTMLInputElement

click

public void click()
Description copied from interface: HTMLInputElement
Simulate a mouse-click. For INPUT elements whose type attribute has one of the following values: "Button", "Checkbox", "Radio", "Reset", or "Submit".

Specified by:
click in interface HTMLInputElement

getAlign

public String getAlign()
Description copied from interface: HTMLInputElement
Aligns this object (vertically or horizontally) with respect to its surrounding text. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Specified by:
getAlign in interface HTMLInputElement

setAlign

public void setAlign(String align)
Specified by:
setAlign in interface HTMLInputElement

getDynamicValue

public Object getDynamicValue(String name,
                              DynEnv env)
Description copied from class: DynamicObject
Returns the `key' field or Defs.NOT_FOUND if `name' does not exist. Returns `FUNCTION_MARK' if `name' represent a function that can be invoke via execDynamicMethod. Note that returned `null' indicates that value is present but set to null.

Overrides:
getDynamicValue in class DElement

setDynamicValue

public int setDynamicValue(String name,
                           Object value,
                           DynEnv env)
Description copied from class: DynamicObject
Set field `name' to `value'. Use `env' to unwrap `value' to a particular type or store it as is

Overrides:
setDynamicValue in class DElement

execDynamicMethod

public Object execDynamicMethod(String name,
                                Object[] args,
                                DynEnv env)
Description copied from class: DynamicObject
Perform function-like actions for `name' with the given args. Returns the result or Defs.NOT_FOUND if name is not associated with function action. Should return result of env.wrapVoid() to indicate method without return value. Use `env' to unwrap `args' elements to a particular type.

Overrides:
execDynamicMethod in class DElement

getForm

public final HTMLFormElement getForm()

getDForm

public DFormElement getDForm()

fixValue

protected String fixValue(String value)