|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Stores an Element in the dom tree.
Method Summary | |
void |
click()
Simulates a click by causing the onclick event to fire. |
boolean |
contains(IElement e)
Checks whether the given element is nested within this element. |
boolean |
equals(IElement element)
Compares another IElement with this one for equality. |
IElementCollection |
filters()
Retrieves a collection of filters for an element. |
java.lang.String |
getAttribute(java.lang.String name,
long flags)
Retrieves the value of the specified attribute. |
java.lang.String[] |
getAttributes()
Returns an array of all the attributes of this object in the form of "name=value" |
IElementCollection |
getChildElements()
Returns an Element Collection of all the Elements Child Nodes |
java.lang.String |
getClassName()
Retrieves the class attribute of the Element. |
java.lang.String |
getId()
Retrieves the string identifying the Element. |
java.lang.String |
getImageSrc()
Returns the src if this is an Image element, otherwise null. |
java.lang.String |
getInnerHTML()
Retrieves the HTML between the start and end tags of the object. |
java.lang.String |
getInnerText()
Retrieves the text between the start and end tags of the object. |
java.lang.String |
getLang()
Retrieves the language to use. |
java.lang.String |
getLanguage()
Retrieves the language in which the current script is written. |
long |
getOffsetHeight()
Retrieves the height of the object relative to the layout or coordinate parent, as specified by the Element::offsetParent property. |
long |
getOffsetLeft()
Retrieves the calculated left position of the object relative to the layout or coordinate parent, as specified by the Element::offsetParent property. |
IElement |
getOffsetParent()
Retrieves a reference to the container object that defines the Element::offsetTop and Element::offsetLeft properties of the object. |
long |
getOffsetTop()
Retrieves the calculated top position of the object relative to the layout or coordinate parent, as specified by the Element::offsetParent property. |
long |
getOffsetWidth()
Retrieves the width of the object relative to the layout or coordinate parent, as specified by the Element::offsetParent property. |
java.lang.String |
getOuterHTML()
Retrieves the object and its content in HTML. |
java.lang.String |
getOuterText()
Retrieves the text of the object. |
IElement |
getParentElement()
Retrieves the parent object in the object hierarchy. |
IElement |
getParentTextEdit()
Retrieves the container object in the document hierarchy that can be used to create a TextRange containing the original object. |
long |
getSelectedIndex()
For SELECT elements in IE will return the selected index. |
long |
getSourceIndex()
Retrieves the ordinal position of the object, in source order, as the object appears in the document's all collection. |
java.lang.String |
getTagName()
Retrieves the tag name of the object. |
java.lang.String |
getTextNodeText()
Returns the contents of a text node or null if the element is not a textnode. |
java.lang.String |
getTitle()
Retrieves advisory information (a ToolTip) for the object. |
java.lang.String |
getValue()
Returns the value of an element if it is an INPUT element. |
void |
insertAdjacentHTML(java.lang.String loc,
java.lang.String html)
Inserts the given HTML text into the element at the location. |
void |
insertAdjacentText(java.lang.String loc,
java.lang.String txt)
Inserts the given text into the element at the specified location. |
void |
insertElementAdjHTML(java.lang.String loc,
java.lang.String html)
Inserts the given HTML text into the element at the location. |
boolean |
isTextEdit()
Retrieves whether a TextRange object can be created using the object. |
boolean |
isTextNode()
Returns true if the Element is a simple text node (only contains text, has no html tag) |
void |
putClassName(java.lang.String name)
Sets the class attribute of the Element. |
void |
putId(java.lang.String id)
Sets the string which identifies the Element. |
void |
putInnerHTML(java.lang.String ih)
Sets the HTML between the start and end tags of the object. |
void |
putInnerText(java.lang.String it)
Sets the text between the start and end tags of the object. |
void |
putLang(java.lang.String lang)
Sets the language to use. |
void |
putLanguage(java.lang.String lang)
Sets the language in which the current script is written. |
void |
putOuterHTML(java.lang.String html)
Sets the object and its content in HTML This applies to an IEBrowserCanvas |
void |
putOuterText(java.lang.String text)
Sets the text of the object. |
void |
putTitle(java.lang.String t)
Sets advisory information (a ToolTip) for the object. |
boolean |
removeAttribute(java.lang.String name,
long flags)
Removes the given attribute from the Element. |
void |
scrollIntoView(boolean b)
Causes the object to scroll into view, aligning it either at the top or bottom of the window. |
void |
setAttribute(java.lang.String name,
java.lang.Object value,
long flags)
Sets the value of the specified attribute. |
void |
setSelectedIndex(long index)
Set the selected index for SELECT elements in IE. |
void |
setValue(java.lang.String value)
Sets the value of an element if it is an INPUT element. |
java.lang.String |
toString()
Retrieves a string representation of the object. |
Method Detail |
public java.lang.String getClassName()
public void putClassName(java.lang.String name)
public void click()
MozillaBrowserCanvas
public boolean contains(IElement e)
public IElementCollection filters()
IEBrowserCanvas
public java.lang.String getAttribute(java.lang.String name, long flags)
name
- of the attributeflags
- 0-case insensitive, 1- case sensitive (unused if called from a IMozillaBrowserCanvas
)
public java.lang.String getId()
public void putId(java.lang.String id)
public java.lang.String getInnerHTML()
public void putInnerHTML(java.lang.String ih)
public java.lang.String getInnerText()
IEBrowserCanvas
public void putInnerText(java.lang.String it)
IEBrowserCanvas
public void insertElementAdjHTML(java.lang.String loc, java.lang.String html)
The location can be one of the following:
loc
- location to put the html code relative to this elementhtml
- code to addpublic void insertAdjacentHTML(java.lang.String loc, java.lang.String html)
The location can be one of the following:
loc
- location to put the html code relative to this elementhtml
- code to addpublic void insertAdjacentText(java.lang.String loc, java.lang.String txt)
IEBrowserCanvas
public boolean isTextEdit()
public java.lang.String getLang()
http://www.w3.org/TR/REC-html40/references.html#ref-RFC1766
public void putLang(java.lang.String lang)
http://www.w3.org/TR/REC-html40/references.html#ref-RFC1766
public java.lang.String getLanguage()
public void putLanguage(java.lang.String lang)
public long getOffsetHeight()
public long getOffsetLeft()
public IElement getOffsetParent()
public long getOffsetTop()
public long getOffsetWidth()
public java.lang.String getOuterHTML()
public void putOuterHTML(java.lang.String html)
IEBrowserCanvas
public java.lang.String getOuterText()
IEBrowserCanvas
public void putOuterText(java.lang.String text)
IEBrowserCanvas
public IElement getParentElement()
public IElement getParentTextEdit()
public boolean removeAttribute(java.lang.String name, long flags)
IEBrowserCanvas
public void scrollIntoView(boolean b)
b
- true
to scroll element to top of screen,
false
to scroll to bottompublic void setAttribute(java.lang.String name, java.lang.Object value, long flags)
name
- name of attributevalue
- value to set attribute to, For IE this should be an isntance of String
,Boolean
, or Integer
depending to the type of value that needs to be set.flags
- 0-case insensitive, 1- case sensitive (unused if called from a IMozillaBrowserCanvas
)public long getSourceIndex()
public java.lang.String getTagName()
public java.lang.String getTitle()
public void putTitle(java.lang.String t)
public IElementCollection getChildElements()
public boolean isTextNode()
public java.lang.String getTextNodeText()
null
if the element is not a textnode.
public java.lang.String getValue()
public long getSelectedIndex()
Will return -1 if nothing is selected or is not a select tag.
public void setSelectedIndex(long index)
index
- public void setValue(java.lang.String value)
value
- public java.lang.String toString()
public java.lang.String getImageSrc()
public java.lang.String[] getAttributes()
public boolean equals(IElement element)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |