org.vectomatic.dom.svg.impl
Class Attr

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.dom.client.Node
          extended by org.vectomatic.dom.svg.impl.Attr

public class Attr
extends com.google.gwt.dom.client.Node

Overlay class for DOM Attr

Author:
laaglu

Field Summary
 
Fields inherited from class com.google.gwt.dom.client.Node
DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE
 
Constructor Summary
protected Attr()
          Constructor
 
Method Summary
 String getName()
          Returns the name of this attribute.
 com.google.gwt.dom.client.Element getOwnerElement()
          The Element node this attribute is attached to or null if this attribute is not in use.
 String getValue()
          On retrieval, the value of the attribute is returned as a string.
 boolean isId()
          Returns whether this attribute is known to be of type ID (i.e.
 void setValue(String value)
          On retrieval, the value of the attribute is returned as a string.
 
Methods inherited from class com.google.gwt.dom.client.Node
appendChild, as, cloneNode, getChild, getChildCount, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPreviousSibling, hasChildNodes, hasParentElement, insertAfter, insertBefore, insertFirst, is, isOrHasChild, removeChild, removeFromParent, replaceChild, setNodeValue
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Attr

protected Attr()
Constructor

Method Detail

getName

public final String getName()
Returns the name of this attribute. If OMNode.localName is different from null, this attribute is a qualified name.

Returns:
the attribute name

getValue

public final String getValue()
On retrieval, the value of the attribute is returned as a string. Character and general entity references are replaced with their values. See also the method getAttribute on the Element interface.
On setting, this creates a Text node with the unparsed contents of the string, i.e. any characters that an XML processor would recognize as markup are instead treated as literal text. See also the method Element.setAttribute().
Some specialized implementations, such as some [SVG 1.1] implementations, may do normalization automatically, even after mutation; in such case, the value on retrieval may differ from the value on setting.

Returns:
the attribute value

setValue

public final void setValue(String value)
                    throws com.google.gwt.core.client.JavaScriptException
On retrieval, the value of the attribute is returned as a string. Character and general entity references are replaced with their values. See also the method getAttribute on the Element interface.
On setting, this creates a Text node with the unparsed contents of the string, i.e. any characters that an XML processor would recognize as markup are instead treated as literal text. See also the method Element.setAttribute().
Some specialized implementations, such as some [SVG 1.1] implementations, may do normalization automatically, even after mutation; in such case, the value on retrieval may differ from the value on setting.

Parameters:
value - the attribute value
Throws:
DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
com.google.gwt.core.client.JavaScriptException

isId

public final boolean isId()
Returns whether this attribute is known to be of type ID (i.e. to contain an identifier for its owner element) or not. When it is and its value is unique, the ownerElement of this attribute can be retrieved using the method Document.getElementById . The implementation could use several ways to determine if an attribute node is known to contain an identifier:
If validation occurred while invoking Document.normalizeDocument(), all user-determined ID attributes are reset and all attribute nodes ID information are then reevaluated in accordance to the schema used. As a consequence, if the Attr.schemaTypeInfo attribute contains an ID type, isId will always return true.

Since:
DOM Level 3

getOwnerElement

public final com.google.gwt.dom.client.Element getOwnerElement()
The Element node this attribute is attached to or null if this attribute is not in use.



Copyright © 2012. All Rights Reserved.