|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nwoods.jgo.svg.AbstractNode
com.nwoods.jgo.svg.DefaultElement
A wrapper class for org.w3c.dom.Element. By implementing the interface DomElement, this class allows the com.nwoods.jgo package to provide methods that manipulate org.w3c.dom.Element objects while not requiring the org.w3c.dom.Element class to be present in order to build com.nwoods.jgo. JGo applications that support serialization to and from SVG XML files require this class.
Constructor Summary | |
DefaultElement(org.w3c.dom.Element element)
Create a new DefaultElement |
Method Summary | |
java.lang.String |
getAttribute(java.lang.String name)
Retrieves an attribute value by name. |
org.w3c.dom.Element |
getElement()
Return the org.w3c.dom.Element associated with this DefaultElement |
java.lang.String |
getLocalName()
Get the local name of the element. |
java.lang.String |
getNamespaceURI()
Get the NamespaceURI of the element. |
java.lang.String |
getPrefix()
Get the prefix of the element. |
java.lang.String |
getSubAttribute(java.lang.String attribute,
java.lang.String subAttribute)
Parses the attribute to return the value following "attribute:" and preceding either ";" or the end of the string. |
java.lang.String |
getTagName()
Get the tag name of the element. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Adds a new attribute. |
Methods inherited from class com.nwoods.jgo.svg.AbstractNode |
appendChild, elementCast, getFirstChild, getFirstChildElement, getFirstChildText, getNextSibling, getNextSiblingElement, getNextSiblingJGoClassElement, getNextSiblingText, getNode, getParentNode, isElement |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.nwoods.jgo.DomNode |
appendChild, elementCast, getFirstChild, getFirstChildElement, getFirstChildText, getNextSibling, getNextSiblingElement, getNextSiblingJGoClassElement, getNextSiblingText, getParentNode, isElement |
Constructor Detail |
public DefaultElement(org.w3c.dom.Element element)
element
- a org.w3c.dom.Element objectMethod Detail |
public org.w3c.dom.Element getElement()
public void setAttribute(java.lang.String name, java.lang.String value)
DomElement
setAttribute
in interface DomElement
name
- the name of the attribute to create or alter.value
- the value to set in string formpublic java.lang.String getAttribute(java.lang.String name)
DomElement
getAttribute
in interface DomElement
name
- of the attribute to retrieve.
public java.lang.String getSubAttribute(java.lang.String attribute, java.lang.String subAttribute)
DomElement
getSubAttribute
in interface DomElement
attribute
- the attribute string to parse.subAttribute
- the subattribute whose value is to be returned.
public java.lang.String getLocalName()
DomElement
getLocalName
in interface DomElement
public java.lang.String getNamespaceURI()
DomElement
getNamespaceURI
in interface DomElement
public java.lang.String getPrefix()
DomElement
getPrefix
in interface DomElement
public java.lang.String getTagName()
DomElement
getTagName
in interface DomElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |