com.gargoylesoftware.htmlunit.html
Class BaseFrame

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.html.DomNode
      extended by com.gargoylesoftware.htmlunit.html.DomNamespaceNode
          extended by com.gargoylesoftware.htmlunit.html.DomElement
              extended by com.gargoylesoftware.htmlunit.html.HtmlElement
                  extended by com.gargoylesoftware.htmlunit.html.StyledElement
                      extended by com.gargoylesoftware.htmlunit.html.BaseFrame
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
HtmlFrame, HtmlInlineFrame

public abstract class BaseFrame
extends StyledElement

Base class for frame and iframe.

Version:
$Revision: 2132 $
Author:
Mike Bowler, David K. Taylor, Christian Sell, Marc Guillemot, David D. Kilzer, Stefan Anzinger, Ahmed Ashour
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement
HtmlElement.ChildElementsIterator, HtmlElement.MapEntryWrappingIterator
 
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.DomNode
DomNode.ChildIterator, DomNode.DescendantElementsIterator
 
Field Summary
 
Fields inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement
ATTRIBUTE_NOT_DEFINED, ATTRIBUTE_VALUE_EMPTY, TAB_INDEX_OUT_OF_BOUNDS
 
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomNode
ATTRIBUTE_NODE, COMMENT_NODE, DOCUMENT_NODE, ELEMENT_NODE, PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED, TEXT_NODE
 
Constructor Summary
protected BaseFrame(String namespaceURI, String qualifiedName, HtmlPage page, Map attributes)
          Create an instance of BaseFrame
 
Method Summary
 Page getEnclosedPage()
          Return the currently loaded page in the enclosed window.
 WebWindow getEnclosedWindow()
          Gets the window enclosed in this frame.
 String getFrameBorderAttribute()
          Return the value of the attribute "frameborder".
 String getLongDescAttribute()
          Return the value of the attribute "longdesc".
 String getMarginHeightAttribute()
          Return the value of the attribute "marginheight".
 String getMarginWidthAttribute()
          Return the value of the attribute "marginwidth".
 String getNameAttribute()
          Return the value of the attribute "name".
 String getNoResizeAttribute()
          Return the value of the attribute "noresize".
 String getOnLoadAttribute()
          Return the value of the attribute "onload".
 String getScrollingAttribute()
          Return the value of the attribute "scrolling".
 String getSrcAttribute()
          Return the value of the attribute "src".
 void setAttributeValue(String namespaceURI, String qualifiedName, String attributeValue)
          Set the value of the specified attribute.
 void setNameAttribute(String name)
          Set the value of the "name" attribute.
 void setSrcAttribute(String attribute)
          Set the value of the "src" attribute.
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.StyledElement
getClassAttribute, getIdAttribute, getStyleAttribute, getTitleAttribute, isRenderedVisible
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement
addHtmlAttributeChangeListener, appendChildIfNoneExists, assertNotEmpty, blur, cloneDomNode, cloneNode, fireEvent, fireEvent, fireHtmlAttributeAdded, fireHtmlAttributeRemoved, fireHtmlAttributeReplaced, focus, getAttribute, getAttributeEntriesIterator, getAttributeNS, getAttributeValue, getChildElementsIterator, getEnclosingElement, getEnclosingForm, getEnclosingFormOrDie, getEventHandler, getHtmlElementById, getHtmlElementsByAttribute, getHtmlElementsByTagName, getHtmlElementsByTagNames, getId, getNodeName, getNodeType, getOneHtmlElementByAttribute, getTabIndex, getTagName, hasAttribute, hasAttributeNS, hasAttributes, hasHtmlElementWithId, isAttributeDefined, isEmptyXmlTagExpanded, isSubmittableByEnter, keyDown, keyDown, mouseDown, mouseDown, mouseMove, mouseMove, mouseOut, mouseOut, mouseOver, mouseOver, mouseUp, mouseUp, notImplemented, preventDefault, printOpeningTagContentAsXml, printXml, removeAttribute, removeAttributeNS, removeChild, removeEventHandler, removeHtmlAttributeChangeListener, rightClick, rightClick, setAttribute, setAttributeNS, setAttributeValue, setEventHandler, setEventHandler, setId, toString, type, type, type, type
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNamespaceNode
getLocalName, getNamespaceURI, getPrefix, getQualifiedName, setPrefix
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNode
addDomChangeListener, addPropertyChangeListener, appendChild, appendDomChild, asText, asXml, fireNodeAdded, fireNodeDeleted, firePropertyChange, getAllHtmlChildElements, getByXPath, getChildIterator, getChildrenAsText, getEndColumnNumber, getEndLineNumber, getFirstByXPath, getFirstChild, getFirstDomChild, getLastChild, getLastDomChild, getLog, getNativePage, getNextDomSibling, getNextSibling, getNodeValue, getPage, getParentDomNode, getParentNode, getPreviousDomSibling, getPreviousSibling, getReadyState, getScriptObject, getStartColumnNumber, getStartLineNumber, insertBefore, isAncestorOf, isTrimmedText, notifyIncorrectness, onAddedToPage, onAllChildrenAddedToPage, printChildrenAsXml, reduceWhitespace, remove, removeAllChildren, removeDomChangeListener, removePropertyChangeListener, replace, setNextSibling, setNodeValue, setParentNode, setPreviousSibling, setReadyState, setScriptObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseFrame

protected BaseFrame(String namespaceURI,
                    String qualifiedName,
                    HtmlPage page,
                    Map attributes)
Create an instance of BaseFrame

Parameters:
namespaceURI - the URI that identifies an XML namespace.
qualifiedName - The qualified name of the element type to instantiate
page - The HtmlPage that contains this element.
attributes - the initial attributes
Method Detail

getLongDescAttribute

public final String getLongDescAttribute()
Return the value of the attribute "longdesc". Refer to the HTML 4.01 documentation for details on the use of this attribute.

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

getNameAttribute

public final 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.

setNameAttribute

public final void setNameAttribute(String name)
Set the value of the "name" attribute.

Parameters:
name - The new window name.

getSrcAttribute

public final String getSrcAttribute()
Return the value of the attribute "src". Refer to the HTML 4.01 documentation for details on the use of this attribute.

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

getFrameBorderAttribute

public final String getFrameBorderAttribute()
Return the value of the attribute "frameborder". Refer to the HTML 4.01 documentation for details on the use of this attribute.

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

getMarginWidthAttribute

public final String getMarginWidthAttribute()
Return the value of the attribute "marginwidth". Refer to the HTML 4.01 documentation for details on the use of this attribute.

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

getMarginHeightAttribute

public final String getMarginHeightAttribute()
Return the value of the attribute "marginheight". Refer to the HTML 4.01 documentation for details on the use of this attribute.

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

getNoResizeAttribute

public final String getNoResizeAttribute()
Return the value of the attribute "noresize". Refer to the HTML 4.01 documentation for details on the use of this attribute.

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

getScrollingAttribute

public final String getScrollingAttribute()
Return the value of the attribute "scrolling". Refer to the HTML 4.01 documentation for details on the use of this attribute.

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

getOnLoadAttribute

public final String getOnLoadAttribute()
Return the value of the attribute "onload". This attribute is not actually supported by the HTML specification however it is supported by the popular browsers.

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

getEnclosedPage

public Page getEnclosedPage()
Return the currently loaded page in the enclosed window. This is a facility method for getEnclosedWindow().getEnclosedPage().

Returns:
The currently loaded page in the enclosed window or null if no page has been loaded.
See Also:
WebWindow.getEnclosedPage()

getEnclosedWindow

public WebWindow getEnclosedWindow()
Gets the window enclosed in this frame.

Returns:
the window

setSrcAttribute

public final void setSrcAttribute(String attribute)
Set the value of the "src" attribute. Also load the frame with the specified url if possible.

Parameters:
attribute - The new value

setAttributeValue

public final void setAttributeValue(String namespaceURI,
                                    String qualifiedName,
                                    String attributeValue)
Set the value of the specified attribute.

Overrides:
setAttributeValue in class HtmlElement
Parameters:
namespaceURI - the URI that identifies an XML namespace.
qualifiedName - The qualified name of the attribute
attributeValue - The value of the attribute


Copyright © 2002-2010 Gargoyle Software Inc.. All Rights Reserved.