Jiffie: Java InterFace For Internet Explorer
net.sf.jiffie
Class ElementContainer
java.lang.Object
net.sf.jiffie.IDispatch
net.sf.jiffie.BrowserDispatch
net.sf.jiffie.IHTMLDOMNode
net.sf.jiffie.ElementContainer
- All Implemented Interfaces:
- java.lang.Cloneable, Releaseable
- Direct Known Subclasses:
- IHTMLDocument2, IHTMLElement
public class ElementContainer
- extends IHTMLDOMNode
This class implements a set of methods common to objects that contain
HTML elements. The common feature of these objects is that they have
an "all" collection, which can be retrieved and filtered in order
to retrieve the child HTML elements.
Note that the getByName methods will retrieve elements from the
document where either the id or the name attribute of that element
matches the supplied name.
| Methods inherited from class net.sf.jiffie.IHTMLDOMNode |
appendChild, createNodeFromProperty, getAttributes, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling |
| Methods inherited from class net.sf.jiffie.IDispatch |
call, call, call, call, call, clone, finalize, getBooleanProperty, getDispatch, getDispatchProperty, getIntegerProperty, getStringProperty, getVariantProperty, isReleased, newDispatch, queryInterface, release, setBooleanProperty, setIntegerProperty, setStringProperty |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ElementContainer
public ElementContainer(InternetExplorer parentBrowser,
Dispatch object)
- Constructor
- Parameters:
parentBrowser - parent browserobject - Jacob dispatch interface
getElementList
public ElementList getElementList()
throws JiffieException
- This method retrieves a collection of all document elements.
- Returns:
- all collection
- Throws:
JiffieException - if error creating element list
getElementListByName
public ElementList getElementListByName(java.lang.String name)
throws JiffieException
- Retrieves an ElementList of zero or more HTML elements by name.
- Parameters:
name - element name
- Returns:
- element list
- Throws:
JiffieException - if error creating element list
getElementListByTag
public ElementList getElementListByTag(java.lang.String tag)
throws JiffieException
- Retrieves an ElementList of zero or more HTML elements by tag name.
- Parameters:
tag - element tag name
- Returns:
- element list
- Throws:
JiffieException - if error creating element list
getElementListByNameAndTag
public ElementList getElementListByNameAndTag(java.lang.String name,
java.lang.String tag)
throws JiffieException
- A convenience method to retrieve an element based on both its name
and its tag.
- Parameters:
name - element nametag - element tag name
- Returns:
- element list
- Throws:
JiffieException - if error creating element list
getElementById
public IDispatch getElementById(java.lang.String elementId)
throws JiffieException
- Retrieves a generic HTML element by id.
- Parameters:
elementId - element id
- Returns:
- HTML element or null if not found
- Throws:
JiffieException - if error creating element list
getElementByName
public IDispatch getElementByName(java.lang.String name)
throws JiffieException
- This is a convenience method provided to simplify code which expects
to retrieve a single element by name.
- Parameters:
name - element name
- Returns:
- element
- Throws:
JiffieException - if error creating element list
getElementByTag
public IDispatch getElementByTag(java.lang.String name)
throws JiffieException
- This is a convenience method provided to simplify code which expects
to retrieve a single element by tag name.
- Parameters:
name - element tag name
- Returns:
- element
- Throws:
JiffieException - if error creating element list
getElementByNameAndTag
public IDispatch getElementByNameAndTag(java.lang.String name,
java.lang.String tag)
throws JiffieException
- This is a convenience method provided to simplify code which expects
to retrieve a single element by name and tag name.
- Parameters:
name - element nametag - element tag name
- Returns:
- element
- Throws:
JiffieException - if error creating element list
Copyright © 2004-2009 Packwood Software. All Rights Reserved.