public interface IElement
Modifier and Type | Method and Description |
---|---|
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.
|
Node |
convertToW3CNode()
Convert this IElement to a W3C DOM Node.
|
boolean |
equals(IElement element)
Compares another IElement with this one for equality.
|
String |
getAttribute(String name,
long flags)
Retrieves the value of the specified attribute.
|
String[] |
getAttributes()
Returns an array of all the attributes of this object
in the form of "name=value"
|
Rectangle2D |
getBoundingClientRect()
Returns the bounding rectangle of this element, relative to its enclosing
browser window or frame.
|
IElementCollection |
getChildElements()
Returns an Element Collection of all the Elements Child Nodes
|
String |
getClassName()
Retrieves the class attribute of the Element.
|
String |
getId()
Retrieves the string identifying the Element.
|
String |
getInnerHTML()
Retrieves the HTML between the start and end
tags of the object.
|
String |
getLang()
Retrieves the language to use.
|
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.
|
String |
getOuterHTML()
Retrieves the object and its content in HTML.
|
IElement |
getParentElement()
Retrieves the parent object in the object hierarchy.
|
long |
getSourceIndex()
Retrieves the ordinal position of the object,
in source order, as the object appears in the
document's all collection.
|
String |
getTagName()
Retrieves the tag name of the object.
|
String |
getTextNodeText()
Returns the contents of a text node or
null if the element is not a textnode. |
String |
getTitle()
Deprecated.
This method is not implemented.
|
String |
getValue()
Returns the value of an element if it is an INPUT element.
|
void |
insertAdjacentHTML(String loc,
String html)
Inserts the given HTML text into the element
at the location.
|
boolean |
isTextNode()
Returns true if the Element is a simple text node (only contains text, has no html tag)
|
void |
putClassName(String name)
Sets the class attribute of the Element.
|
void |
putId(String id)
Sets the string which identifies the Element.
|
void |
putInnerHTML(String ih)
Sets the HTML between the start and end tags
of the object.
|
void |
putLang(String lang)
Sets the language to use.
|
void |
putOuterHTML(String html)
Sets the object and its content in HTML
|
void |
putTitle(String t)
Sets advisory information (a ToolTip) for
the object.
|
boolean |
removeAttribute(String name,
long flags)
Removes the given attribute from the Element.
|
void |
setAttribute(String name,
Object value,
long flags)
Sets the value of the specified attribute.
|
void |
setValue(String value)
Sets the value of an element if it is an INPUT element.
|
String |
toString()
Retrieves a string representation of the
object.
|
String getClassName()
void putClassName(String name)
void click()
MozillaBrowserCanvas
boolean contains(IElement e)
String getAttribute(String name, long flags)
name
- of the attributeflags
- 0-case insensitive, 1- case sensitive (unused if called from a IMozillaBrowserCanvas
)String getId()
void putId(String id)
String getInnerHTML()
void putInnerHTML(String ih)
void insertAdjacentHTML(String loc, String html)
The location can be one of the following:
loc
- location to put the html code relative to this elementhtml
- code to addString getLang()
void putLang(String lang)
long getOffsetHeight()
long getOffsetLeft()
IElement getOffsetParent()
long getOffsetTop()
long getOffsetWidth()
String getOuterHTML()
void putOuterHTML(String html)
IElement getParentElement()
boolean removeAttribute(String name, long flags)
IEBrowserCanvas
void setAttribute(String name, Object value, long flags)
name
- name of attributevalue
- value to set attribute toflags
- 0-case insensitive, 1- case sensitive (unused if called from a IMozillaBrowserCanvas
)long getSourceIndex()
String getTagName()
String getTitle()
void putTitle(String t)
IElementCollection getChildElements()
boolean isTextNode()
String getTextNodeText()
null
if the element is not a textnode.String getValue()
void setValue(String value)
value
- Rectangle2D getBoundingClientRect()
String toString()
String[] getAttributes()
Node convertToW3CNode()
Node
boolean equals(IElement element)