public abstract class BlockElement extends ParsedHTML implements HTMLSegment, HTMLElement
| Modifier | Constructor and Description |
|---|---|
protected |
BlockElement(WebResponse response,
FrameSelector frame,
java.net.URL baseURL,
java.lang.String baseTarget,
org.w3c.dom.Node rootNode,
java.lang.String characterSet) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
doEvent(java.lang.String eventScript)
Deprecated.
since 1.7 - use doEventScript instead
|
boolean |
doEventScript(java.lang.String eventScript)
optional do the event if it's defined
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAttribute(java.lang.String name)
get the attribute with the given name
|
protected int |
getAttributeValue(org.w3c.dom.Node node,
java.lang.String attributeName,
int defaultValue) |
java.lang.String |
getClassName()
Returns the class attribute associated with this element.
|
org.w3c.dom.Node |
getDOM()
Returns a copy of the domain object model associated with this HTML segment.
|
java.lang.String |
getID()
Returns the ID associated with this element.
|
java.lang.String |
getName()
Returns the name associated with this element.
|
org.w3c.dom.Node |
getNode()
Returns the DOM node underlying this element.
|
ScriptableDelegate |
getParentDelegate()
Returns the scriptable delegate which can provide the scriptable delegate for this element.
|
ScriptingHandler |
getScriptingHandler()
Returns the delegate which supports scripting this element.
|
java.lang.String |
getTagName()
Returns the tag for this block.
|
java.lang.String |
getText()
Returns the text value of this block.
|
java.lang.String |
getTitle()
Returns the title associated with this element.
|
boolean |
handleEvent(java.lang.String eventName)
handle the event with the given name by getting the
attribute and then executing the eventScript for it
|
int |
hashCode() |
boolean |
isSupportedAttribute(java.lang.String name)
Returns true if this element may have an attribute with the specified name.
|
ScriptableDelegate |
newScriptable() |
void |
removeAttribute(java.lang.String name)
remove the attribute with the given name
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
set the attribute with the given name to the given value
|
getApplets, getElementNames, getElementsWithAttribute, getElementsWithName, getElementWithID, getFirstMatchingForm, getFirstMatchingLink, getFirstMatchingTable, getFirstMatchingTextBlock, getForms, getFormWithID, getFormWithName, getFrames, getImages, getImageWithAltText, getImageWithName, getImageWithSource, getLinks, getLinkWith, getLinkWithID, getLinkWithImageText, getLinkWithName, getMatchingForms, getMatchingLinks, getMatchingTables, getNextTextBlock, getTables, getTableStartingWith, getTableStartingWithPrefix, getTableWithID, getTableWithSummary, getTextBlocks, isWebLink, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetApplets, getElementNames, getElementsWithAttribute, getElementsWithName, getElementWithID, getFirstMatchingForm, getFirstMatchingLink, getFirstMatchingTable, getForms, getFormWithID, getFormWithName, getImages, getImageWithAltText, getImageWithName, getImageWithSource, getLinks, getLinkWith, getLinkWithImageText, getMatchingForms, getMatchingLinks, getMatchingTables, getTables, getTableStartingWith, getTableStartingWithPrefix, getTableWithID, getTableWithSummary, getTextBlocksprotected BlockElement(WebResponse response, FrameSelector frame, java.net.URL baseURL, java.lang.String baseTarget, org.w3c.dom.Node rootNode, java.lang.String characterSet)
public java.lang.String getText()
getText in interface HTMLElementpublic java.lang.String getTagName()
getTagName in interface HTMLElementpublic org.w3c.dom.Node getDOM()
getDOM in class ParsedHTMLpublic java.lang.String getID()
getID in interface HTMLElementpublic java.lang.String getClassName()
getClassName in interface HTMLElementpublic java.lang.String getName()
getName in interface HTMLElementpublic java.lang.String getTitle()
getTitle in interface HTMLElementpublic ScriptingHandler getScriptingHandler()
getScriptingHandler in interface HTMLElementpublic boolean doEvent(java.lang.String eventScript)
doEvent in interface ScriptingEventHandlereventScript - - the script to usepublic boolean doEventScript(java.lang.String eventScript)
doEventScript in interface ScriptingEventHandlereventScript - - the script to work onpublic boolean handleEvent(java.lang.String eventName)
ScriptingEventHandlerhandleEvent in interface ScriptingEventHandlerpublic ScriptableDelegate getParentDelegate()
HTMLElementgetParentDelegate in interface HTMLElementpublic ScriptableDelegate newScriptable()
newScriptable in interface HTMLElementpublic java.lang.String getAttribute(java.lang.String name)
getAttribute in interface HTMLElementname - - the name of the attribute to getpublic void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface HTMLElementname - - the name of the attribute to setvalue - - the value to usepublic void removeAttribute(java.lang.String name)
removeAttribute in interface HTMLElementname - - the name of the attributepublic boolean isSupportedAttribute(java.lang.String name)
isSupportedAttribute in interface HTMLElementpublic org.w3c.dom.Node getNode()
HTMLElementgetNode in interface HTMLElementpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectprotected int getAttributeValue(org.w3c.dom.Node node,
java.lang.String attributeName,
int defaultValue)