com.gargoylesoftware.htmlunit.html
Class HtmlAnchor

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.html.DomNode
      extended by com.gargoylesoftware.htmlunit.html.DomNamespaceNode
          extended by com.gargoylesoftware.htmlunit.html.HtmlElement
              extended by com.gargoylesoftware.htmlunit.html.StyledElement
                  extended by com.gargoylesoftware.htmlunit.html.ClickableElement
                      extended by com.gargoylesoftware.htmlunit.html.FocusableElement
                          extended by com.gargoylesoftware.htmlunit.html.HtmlAnchor
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class HtmlAnchor
extends FocusableElement

Wrapper for the html element "a"

Version:
$Revision: 1.3 $
Author:
Mike Bowler, David K. Taylor, Christian Sell, Ahmed Ashour
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement
HtmlElement.MapEntryWrappingIterator
 
Field Summary
static java.lang.String TAG_NAME
 the HTML tag represented by this element
 
Fields inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement
ATTRIBUTE_NOT_DEFINED, ATTRIBUTE_VALUE_EMPTY
 
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomNode
PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED
 
Method Summary
 java.lang.String getAccessKeyAttribute()
 Return the value of the attribute "accesskey".
 java.lang.String getCharsetAttribute()
 Return the value of the attribute "charset".
 java.lang.String getCoordsAttribute()
 Return the value of the attribute "coords".
 java.lang.String getHrefAttribute()
 Return the value of the attribute "href".
 java.lang.String getHrefLangAttribute()
 Return the value of the attribute "hreflang".
 java.lang.String getNameAttribute()
 Return the value of the attribute "name".
 java.lang.String getOnBlurAttribute()
 Return the value of the attribute "onblur".
 java.lang.String getOnFocusAttribute()
 Return the value of the attribute "onfocus".
 java.lang.String getRelAttribute()
 Return the value of the attribute "rel".
 java.lang.String getRevAttribute()
 Return the value of the attribute "rev".
 java.lang.String getShapeAttribute()
 Return the value of the attribute "shape".
 java.lang.String getTabIndexAttribute()
 Return the value of the attribute "tabindex".
 java.lang.String getTargetAttribute()
 Return the value of the attribute "target".
 java.lang.String getTypeAttribute()
 Return the value of the attribute "type".
 Page openLinkInNewWindow()
 Open this link in a new window, much as web browsers do when you shift-click a link or use the context menu to open in a new window.
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.FocusableElement
blur, focus
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.ClickableElement
click, click, dblClick, dblClick, getLangAttribute, getOnClickAttribute, getOnDblClickAttribute, getOnKeyDownAttribute, getOnKeyPressAttribute, getOnKeyUpAttribute, getOnMouseDownAttribute, getOnMouseMoveAttribute, getOnMouseOutAttribute, getOnMouseOverAttribute, getOnMouseUpAttribute, getTextDirectionAttribute, getXmlLangAttribute
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.StyledElement
getClassAttribute, getIdAttribute, getStyleAttribute, getTitleAttribute
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement
addHtmlAttributeChangeListener, appendChildIfNoneExists, cloneDomNode, fireEvent, fireEvent, getAttributeEntriesIterator, getAttributeValue, getChildElementsIterator, getEnclosingElement, getEnclosingForm, getEnclosingFormOrDie, getEventHandler, getHtmlElementById, getHtmlElementsByAttribute, getHtmlElementsByTagName, getHtmlElementsByTagNames, getId, getNodeName, getNodeType, getOneHtmlElementByAttribute, getTagName, hasHtmlElementWithId, isAttributeDefined, keyDown, keyDown, mouseDown, mouseDown, mouseMove, mouseMove, mouseOut, mouseOut, mouseOver, mouseOver, mouseUp, mouseUp, removeAttribute, removeChild, removeEventHandler, removeHtmlAttributeChangeListener, rightClick, rightClick, setAttributeValue, setEventHandler, setEventHandler, setId, toString
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNamespaceNode
getLocalName, getNamespaceURI, getPrefix, getQualifiedName, setPrefix
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNode
addDomChangeListener, appendDomChild, asText, asXml, getAllHtmlChildElements, getByXPath, getChildIterator, getEndColumnNumber, getEndLineNumber, getFirstDomChild, getLastDomChild, getNextDomSibling, getNodeValue, getPage, getParentDomNode, getPreviousDomSibling, getReadyState, getScriptObject, getStartColumnNumber, getStartLineNumber, insertBefore, remove, removeAllChildren, removeDomChangeListener, replace, setNodeValue, setReadyState, setScriptObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
the HTML tag represented by this element

See Also:
Constant Field Values
Method Detail

getAccessKeyAttribute

public final java.lang.String getAccessKeyAttribute()
Return the value of the attribute "accesskey". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "accesskey" or an empty string if that attribute isn't defined.

getCharsetAttribute

public final java.lang.String getCharsetAttribute()
Return the value of the attribute "charset". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "charset" or an empty string if that attribute isn't defined.

getCoordsAttribute

public final java.lang.String getCoordsAttribute()
Return the value of the attribute "coords". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "coords" or an empty string if that attribute isn't defined.

getHrefAttribute

public final java.lang.String getHrefAttribute()
Return the value of the attribute "href". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "href" or an empty string if that attribute isn't defined.

getHrefLangAttribute

public final java.lang.String getHrefLangAttribute()
Return the value of the attribute "hreflang". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "hreflang" or an empty string if that attribute isn't defined.

getNameAttribute

public final java.lang.String getNameAttribute()
Return the value of the attribute "name". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "name" or an empty string if that attribute isn't defined.

getOnBlurAttribute

public final java.lang.String getOnBlurAttribute()
Return the value of the attribute "onblur". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "onblur" or an empty string if that attribute isn't defined.

getOnFocusAttribute

public final java.lang.String getOnFocusAttribute()
Return the value of the attribute "onfocus". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "onfocus" or an empty string if that attribute isn't defined.

getRelAttribute

public final java.lang.String getRelAttribute()
Return the value of the attribute "rel". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "rel" or an empty string if that attribute isn't defined.

getRevAttribute

public final java.lang.String getRevAttribute()
Return the value of the attribute "rev". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "rev" or an empty string if that attribute isn't defined.

getShapeAttribute

public final java.lang.String getShapeAttribute()
Return the value of the attribute "shape". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "shape" or an empty string if that attribute isn't defined.

getTabIndexAttribute

public final java.lang.String getTabIndexAttribute()
Return the value of the attribute "tabindex". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "tabindex" or an empty string if that attribute isn't defined.

getTargetAttribute

public final java.lang.String getTargetAttribute()
Return the value of the attribute "target". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "target" or an empty string if that attribute isn't defined.

getTypeAttribute

public final java.lang.String getTypeAttribute()
Return the value of the attribute "type". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "type" or an empty string if that attribute isn't defined.

openLinkInNewWindow

public final Page openLinkInNewWindow()
                               throws java.net.MalformedURLException
Open this link in a new window, much as web browsers do when you shift-click a link or use the context menu to open in a new window. It should be noted that even web browsers will sometimes not give the expected result when using this method of following links. Links that have no real href and rely on javascript to do their work will fail.

Returns:
The Page opened by this link, nested in a new TopLevelWindow
Throws:
java.net.MalformedURLException - if the href could not be converted to a valid URL


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.