|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.batik.dom.AbstractNode
org.apache.batik.dom.AbstractParentNode
org.apache.batik.dom.AbstractParentChildNode
org.apache.batik.dom.AbstractElement
org.apache.batik.anim.dom.AbstractElement
org.apache.batik.anim.dom.SVGOMElement
public abstract class SVGOMElement
This class implements the SVGElement interface.
| Nested Class Summary | |
|---|---|
protected class |
SVGOMElement.UnitContext
To resolve the units. |
| Nested classes/interfaces inherited from class org.apache.batik.anim.dom.AbstractElement |
|---|
AbstractElement.ExtendedNamedNodeHashMap |
| Nested classes/interfaces inherited from class org.apache.batik.dom.AbstractElement |
|---|
AbstractElement.ElementTypeInfo, AbstractElement.Entry, AbstractElement.NamedNodeHashMap |
| Nested classes/interfaces inherited from class org.apache.batik.dom.AbstractParentNode |
|---|
AbstractParentNode.ChildNodes, AbstractParentNode.ElementsByTagName, AbstractParentNode.ElementsByTagNameNS |
| Field Summary | |
|---|---|
protected String |
prefix
The element prefix. |
protected boolean |
readonly
Is this element immutable? |
protected SVGContext |
svgContext
The SVG context to get SVG specific informations. |
protected DoublyIndexedTable |
targetListeners
Table mapping namespaceURI/local name pairs to LinkedLists
of AnimationTargetListeners. |
protected UnitProcessor.Context |
unitContext
The context used to resolve the units. |
protected static DoublyIndexedTable |
xmlTraitInformation
Table mapping XML attribute names to TraitInformation objects. |
| Fields inherited from class org.apache.batik.anim.dom.AbstractElement |
|---|
liveAttributeValues |
| Fields inherited from class org.apache.batik.dom.AbstractElement |
|---|
attributes, typeInfo |
| Fields inherited from class org.apache.batik.dom.AbstractParentChildNode |
|---|
nextSibling, parentNode, previousSibling |
| Fields inherited from class org.apache.batik.dom.AbstractParentNode |
|---|
childNodes |
| Fields inherited from class org.apache.batik.dom.AbstractNode |
|---|
DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, EMPTY_NODE_LIST, eventSupport, managerData, ownerDocument, userData, userDataHandlers |
| Fields inherited from interface org.apache.batik.anim.dom.AnimationTarget |
|---|
PERCENTAGE_FONT_SIZE, PERCENTAGE_VIEWPORT_HEIGHT, PERCENTAGE_VIEWPORT_SIZE, PERCENTAGE_VIEWPORT_WIDTH |
| Constructor Summary | |
|---|---|
protected |
SVGOMElement()
Creates a new Element object. |
protected |
SVGOMElement(String prefix,
AbstractDocument owner)
Creates a new Element object. |
| Method Summary | |
|---|---|
void |
addTargetListener(String ns,
String an,
boolean isCSS,
AnimationTargetListener l)
Adds a listener for changes to the given attribute value. |
protected Node |
copyInto(Node n)
Copy the fields of the current node into the given node. |
protected SVGOMAnimatedBoolean |
createLiveAnimatedBoolean(String ns,
String ln,
boolean def)
Creates a new SVGOMAnimatedBoolean and stores it in
this element's LiveAttributeValue table. |
protected SVGOMAnimatedEnumeration |
createLiveAnimatedEnumeration(String ns,
String ln,
String[] val,
short def)
Creates a new SVGOMAnimatedEnumeration and stores it in
this element's LiveAttributeValue table. |
protected SVGOMAnimatedInteger |
createLiveAnimatedInteger(String ns,
String ln,
int def)
Creates a new SVGOMAnimatedInteger and stores it in
this element's LiveAttributeValue table. |
protected SVGOMAnimatedLength |
createLiveAnimatedLength(String ns,
String ln,
String val,
short dir,
boolean nonneg)
Creates a new SVGOMAnimatedLength and stores it in
this element's LiveAttributeValue table. |
protected SVGOMAnimatedLengthList |
createLiveAnimatedLengthList(String ns,
String ln,
String def,
boolean emptyAllowed,
short dir)
Creates a new SVGOMAnimatedLengthList and stores it in
this element's LiveAttributeValue table. |
protected SVGOMAnimatedMarkerOrientValue |
createLiveAnimatedMarkerOrientValue(String ns,
String ln)
Creates a new SVGOMAnimatedMarkerOrientValue and stores it in
this element's LiveAttributeValue table. |
protected SVGOMAnimatedNumber |
createLiveAnimatedNumber(String ns,
String ln,
float def)
Creates a new SVGOMAnimatedNumber and stores it in
this element's LiveAttributeValue table. |
protected SVGOMAnimatedNumber |
createLiveAnimatedNumber(String ns,
String ln,
float def,
boolean allowPercentage)
Creates a new SVGOMAnimatedNumber that can be parsed as a
percentage and stores it in this element's LiveAttributeValue table. |
protected SVGOMAnimatedNumberList |
createLiveAnimatedNumberList(String ns,
String ln,
String def,
boolean canEmpty)
Creates a new SVGOMAnimatedNumberList and stores it in
this element's LiveAttributeValue table. |
protected SVGOMAnimatedPathData |
createLiveAnimatedPathData(String ns,
String ln,
String def)
Creates a new SVGOMAnimatedPathData and stores it in
this element's LiveAttributeValue table. |
protected SVGOMAnimatedPoints |
createLiveAnimatedPoints(String ns,
String ln,
String def)
Creates a new SVGOMAnimatedPoints and stores it in
this element's LiveAttributeValue table. |
protected SVGOMAnimatedPreserveAspectRatio |
createLiveAnimatedPreserveAspectRatio()
Creates a new SVGOMAnimatedPreserveAspectRatio and stores it in
this element's LiveAttributeValue table. |
protected SVGOMAnimatedRect |
createLiveAnimatedRect(String ns,
String ln,
String value)
Creates a new SVGOMAnimatedRect and stores it in
this element's LiveAttributeValue table. |
protected SVGOMAnimatedString |
createLiveAnimatedString(String ns,
String ln)
Creates a new SVGOMAnimatedString and stores it in
this element's LiveAttributeValue table. |
protected SVGOMAnimatedTransformList |
createLiveAnimatedTransformList(String ns,
String ln,
String def)
Creates a new SVGOMAnimatedTransformList and stores it in
this element's LiveAttributeValue table. |
org.w3c.dom.svg.SVGException |
createSVGException(short type,
String key,
Object[] args)
Creates an SVGException with the appropriate error message. |
protected Node |
deepCopyInto(Node n)
Deeply copy the fields of the current node into the given node. |
protected Node |
deepExport(Node n,
AbstractDocument d)
Deeply exports this node to the given document. |
protected Node |
export(Node n,
AbstractDocument d)
Exports this node to the given document. |
protected short |
getAttributePercentageInterpretation(String ns,
String ln)
Gets how percentage values are interpreted by the given attribute. |
int |
getAttributeType(String ns,
String ln)
Returns the type of the given attribute. |
protected AnimatableValue |
getBaseValue(org.w3c.dom.svg.SVGAnimatedInteger n,
org.w3c.dom.svg.SVGAnimatedInteger on)
Returns an AnimatableNumberOptionalNumberValue for the base value of the given two SVGAnimatedIntegers. |
protected AnimatableValue |
getBaseValue(org.w3c.dom.svg.SVGAnimatedNumber n,
org.w3c.dom.svg.SVGAnimatedNumber on)
Returns an AnimatableNumberOptionalNumberValue for the base value of the given two SVGAnimatedNumbers. |
protected String |
getCascadedXMLBase(Node node)
Returns the xml:base attribute value of the given element, resolving any dependency on parent bases if needed. |
Element |
getElement()
Returns the element. |
String |
getId()
DOM: Implements SVGElement.getId(). |
String |
getNamespaceURI()
DOM: Implements Node.getNamespaceURI(). |
String |
getNodeName()
DOM: Implements Node.getNodeName(). |
org.w3c.dom.svg.SVGSVGElement |
getOwnerSVGElement()
DOM: Implements SVGElement.getOwnerSVGElement(). |
short |
getPercentageInterpretation(String ns,
String an,
boolean isCSS)
Gets how percentage values are interpreted by the given attribute or property. |
int |
getPropertyType(String pn)
Returns the type of the given property. |
SVGContext |
getSVGContext()
Returns the SVG context used to get SVG specific informations. |
protected DoublyIndexedTable |
getTraitInformationTable()
Returns the table of TraitInformation objects for this element. |
AnimatableValue |
getUnderlyingValue(String ns,
String ln)
Returns the underlying value of an animatable XML attribute. |
org.w3c.dom.svg.SVGElement |
getViewportElement()
DOM: Implements SVGElement.getViewportElement(). |
String |
getXMLbase()
DOM: Implements SVGElement.getXMLbase(). |
boolean |
hasProperty(String pn)
Returns whether the given CSS property is available on this element. |
boolean |
hasTrait(String ns,
String ln)
Returns whether the given trait is available on this element. |
protected void |
initializeAllLiveAttributes()
Initializes all live attributes for this element. |
boolean |
isAttributeAdditive(String ns,
String ln)
Returns whether the given XML attribute is additive. |
boolean |
isAttributeAnimatable(String ns,
String ln)
Returns whether the given XML attribute is animatable. |
boolean |
isPropertyAdditive(String pn)
Returns whether the given CSS property is additive. |
boolean |
isPropertyAnimatable(String pn)
Returns whether the given CSS property is animatable. |
boolean |
isReadonly()
Tests whether this node is readonly. |
boolean |
isTraitAdditive(String ns,
String tn)
Returns whether the given trait is additive. |
boolean |
isTraitAnimatable(String ns,
String tn)
Returns whether the given trait is animatable. |
void |
removeTargetListener(String ns,
String an,
boolean isCSS,
AnimationTargetListener l)
Removes a listener for changes to the given attribute value. |
void |
setId(String id)
DOM: Implements SVGElement.setId(String). |
void |
setPrefix(String prefix)
DOM: Implements Node.setPrefix(String). |
void |
setReadonly(boolean v)
Sets this node readonly attribute. |
void |
setSVGContext(SVGContext ctx)
Sets the SVG context to use to get SVG specific informations. |
void |
setXMLbase(String xmlbase)
DOM: Implements SVGElement.setXMLbase(String). |
float |
svgToUserSpace(float v,
short type,
short pcInterp)
Converts the given SVG length into user units. |
void |
updateAttributeValue(String ns,
String ln,
AnimatableValue val)
Updates an attribute value in this target. |
void |
updateOtherValue(String type,
AnimatableValue val)
Updates a 'other' animation value in this target. |
void |
updatePropertyValue(String pn,
AnimatableValue val)
Updates a property value in this target. |
boolean |
useLinearRGBColorInterpolation()
Returns whether color interpolations should be done in linear RGB color space rather than sRGB. |
| Methods inherited from class org.apache.batik.anim.dom.AbstractElement |
|---|
attrAdded, attrModified, attrRemoved, createAttributes, fireDOMAttrModifiedEvent, getAttributeInitializer, getCSSFirstChild, getCSSLastChild, getCSSNextSibling, getCSSParentNode, getCSSPreviousSibling, getLiveAttributeValue, initializeAttributes, isHiddenFromSelectors, putLiveAttributeValue, resetAttribute, setUnspecifiedAttribute |
| Methods inherited from class org.apache.batik.dom.AbstractParentChildNode |
|---|
getNextSibling, getParentNode, getPreviousSibling, setNextSibling, setParentNode, setPreviousSibling |
| Methods inherited from class org.apache.batik.dom.AbstractParentNode |
|---|
appendChild, checkAndRemove, fireDOMNodeInsertedEvent, fireDOMNodeInsertedIntoDocumentEvent, fireDOMNodeRemovedEvent, fireDOMNodeRemovedFromDocumentEvent, fireDOMSubtreeModifiedEvent, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getTextContent, hasChildNodes, insertBefore, removeChild, replaceChild |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Element |
|---|
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
| Methods inherited from interface org.w3c.dom.Node |
|---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNextSibling, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setTextContent, setUserData |
| Methods inherited from interface org.apache.batik.dom.events.NodeEventTarget |
|---|
addEventListenerNS, dispatchEvent, getEventSupport, getParentNodeEventTarget, removeEventListenerNS |
| Methods inherited from interface org.w3c.dom.events.EventTarget |
|---|
addEventListener, removeEventListener |
| Field Detail |
|---|
protected static DoublyIndexedTable xmlTraitInformation
protected transient boolean readonly
protected String prefix
protected transient SVGContext svgContext
protected DoublyIndexedTable targetListeners
LinkedLists
of AnimationTargetListeners.
protected UnitProcessor.Context unitContext
| Constructor Detail |
|---|
protected SVGOMElement()
protected SVGOMElement(String prefix,
AbstractDocument owner)
prefix - The namespace prefix.owner - The owner document.| Method Detail |
|---|
protected void initializeAllLiveAttributes()
public String getId()
SVGElement.getId().
getId in interface org.w3c.dom.svg.SVGElementgetId in class AbstractElementpublic void setId(String id)
SVGElement.setId(String).
setId in interface org.w3c.dom.svg.SVGElementpublic String getXMLbase()
SVGElement.getXMLbase().
getXMLbase in interface org.w3c.dom.svg.SVGElement
public void setXMLbase(String xmlbase)
throws DOMException
SVGElement.setXMLbase(String).
setXMLbase in interface org.w3c.dom.svg.SVGElementDOMExceptionpublic org.w3c.dom.svg.SVGSVGElement getOwnerSVGElement()
SVGElement.getOwnerSVGElement().
getOwnerSVGElement in interface org.w3c.dom.svg.SVGElementpublic org.w3c.dom.svg.SVGElement getViewportElement()
SVGElement.getViewportElement().
getViewportElement in interface org.w3c.dom.svg.SVGElementpublic String getNodeName()
Node.getNodeName().
getNodeName in interface Nodepublic String getNamespaceURI()
Node.getNamespaceURI().
getNamespaceURI in interface NodegetNamespaceURI in class AbstractNode
public void setPrefix(String prefix)
throws DOMException
Node.setPrefix(String).
setPrefix in interface NodesetPrefix in class AbstractNodeDOMExceptionprotected String getCascadedXMLBase(Node node)
getCascadedXMLBase in class AbstractNodepublic void setSVGContext(SVGContext ctx)
ctx - the SVG contextpublic SVGContext getSVGContext()
public org.w3c.dom.svg.SVGException createSVGException(short type,
String key,
Object[] args)
public boolean isReadonly()
isReadonly in interface ExtendedNodepublic void setReadonly(boolean v)
setReadonly in interface ExtendedNodeprotected DoublyIndexedTable getTraitInformationTable()
protected SVGOMAnimatedTransformList createLiveAnimatedTransformList(String ns,
String ln,
String def)
SVGOMAnimatedTransformList and stores it in
this element's LiveAttributeValue table.
protected SVGOMAnimatedBoolean createLiveAnimatedBoolean(String ns,
String ln,
boolean def)
SVGOMAnimatedBoolean and stores it in
this element's LiveAttributeValue table.
protected SVGOMAnimatedString createLiveAnimatedString(String ns,
String ln)
SVGOMAnimatedString and stores it in
this element's LiveAttributeValue table.
protected SVGOMAnimatedPreserveAspectRatio createLiveAnimatedPreserveAspectRatio()
SVGOMAnimatedPreserveAspectRatio and stores it in
this element's LiveAttributeValue table.
protected SVGOMAnimatedMarkerOrientValue createLiveAnimatedMarkerOrientValue(String ns,
String ln)
SVGOMAnimatedMarkerOrientValue and stores it in
this element's LiveAttributeValue table.
protected SVGOMAnimatedPathData createLiveAnimatedPathData(String ns,
String ln,
String def)
SVGOMAnimatedPathData and stores it in
this element's LiveAttributeValue table.
protected SVGOMAnimatedNumber createLiveAnimatedNumber(String ns,
String ln,
float def)
SVGOMAnimatedNumber and stores it in
this element's LiveAttributeValue table.
protected SVGOMAnimatedNumber createLiveAnimatedNumber(String ns,
String ln,
float def,
boolean allowPercentage)
SVGOMAnimatedNumber that can be parsed as a
percentage and stores it in this element's LiveAttributeValue table.
protected SVGOMAnimatedNumberList createLiveAnimatedNumberList(String ns,
String ln,
String def,
boolean canEmpty)
SVGOMAnimatedNumberList and stores it in
this element's LiveAttributeValue table.
protected SVGOMAnimatedPoints createLiveAnimatedPoints(String ns,
String ln,
String def)
SVGOMAnimatedPoints and stores it in
this element's LiveAttributeValue table.
protected SVGOMAnimatedLengthList createLiveAnimatedLengthList(String ns,
String ln,
String def,
boolean emptyAllowed,
short dir)
SVGOMAnimatedLengthList and stores it in
this element's LiveAttributeValue table.
protected SVGOMAnimatedInteger createLiveAnimatedInteger(String ns,
String ln,
int def)
SVGOMAnimatedInteger and stores it in
this element's LiveAttributeValue table.
protected SVGOMAnimatedEnumeration createLiveAnimatedEnumeration(String ns,
String ln,
String[] val,
short def)
SVGOMAnimatedEnumeration and stores it in
this element's LiveAttributeValue table.
protected SVGOMAnimatedLength createLiveAnimatedLength(String ns,
String ln,
String val,
short dir,
boolean nonneg)
SVGOMAnimatedLength and stores it in
this element's LiveAttributeValue table.
protected SVGOMAnimatedRect createLiveAnimatedRect(String ns,
String ln,
String value)
SVGOMAnimatedRect and stores it in
this element's LiveAttributeValue table.
public boolean hasProperty(String pn)
hasProperty in interface ExtendedTraitAccess
public boolean hasTrait(String ns,
String ln)
hasTrait in interface ExtendedTraitAccesspublic boolean isPropertyAnimatable(String pn)
isPropertyAnimatable in interface ExtendedTraitAccess
public final boolean isAttributeAnimatable(String ns,
String ln)
isAttributeAnimatable in interface ExtendedTraitAccesspublic boolean isPropertyAdditive(String pn)
isPropertyAdditive in interface ExtendedTraitAccess
public boolean isAttributeAdditive(String ns,
String ln)
isAttributeAdditive in interface ExtendedTraitAccess
public boolean isTraitAnimatable(String ns,
String tn)
isTraitAnimatable in interface ExtendedTraitAccess
public boolean isTraitAdditive(String ns,
String tn)
isTraitAdditive in interface ExtendedTraitAccesspublic int getPropertyType(String pn)
getPropertyType in interface ExtendedTraitAccess
public final int getAttributeType(String ns,
String ln)
getAttributeType in interface ExtendedTraitAccesspublic Element getElement()
getElement in interface AnimationTarget
public void updatePropertyValue(String pn,
AnimatableValue val)
SVGStylableElement to actually update
properties.
updatePropertyValue in interface AnimationTarget
public void updateAttributeValue(String ns,
String ln,
AnimatableValue val)
updateAttributeValue in interface AnimationTarget
public void updateOtherValue(String type,
AnimatableValue val)
updateOtherValue in interface AnimationTarget
public AnimatableValue getUnderlyingValue(String ns,
String ln)
getUnderlyingValue in interface AnimationTarget
protected AnimatableValue getBaseValue(org.w3c.dom.svg.SVGAnimatedInteger n,
org.w3c.dom.svg.SVGAnimatedInteger on)
protected AnimatableValue getBaseValue(org.w3c.dom.svg.SVGAnimatedNumber n,
org.w3c.dom.svg.SVGAnimatedNumber on)
public short getPercentageInterpretation(String ns,
String an,
boolean isCSS)
getPercentageInterpretation in interface AnimationTarget
protected final short getAttributePercentageInterpretation(String ns,
String ln)
public boolean useLinearRGBColorInterpolation()
SVGStylableElement
to actually look up the 'color-interpolation' property.
useLinearRGBColorInterpolation in interface AnimationTarget
public float svgToUserSpace(float v,
short type,
short pcInterp)
svgToUserSpace in interface AnimationTargetv - the SVG length valuetype - the SVG length units (one of the
SVGLength.SVG_LENGTH_* constants)pcInterp - how to interpretet percentage values (one of the
SVGContext.PERCENTAGE_* constants)
public void addTargetListener(String ns,
String an,
boolean isCSS,
AnimationTargetListener l)
addTargetListener in interface AnimationTarget
public void removeTargetListener(String ns,
String an,
boolean isCSS,
AnimationTargetListener l)
removeTargetListener in interface AnimationTarget
protected Node export(Node n,
AbstractDocument d)
export in class AbstractElement
protected Node deepExport(Node n,
AbstractDocument d)
deepExport in class AbstractElementprotected Node copyInto(Node n)
copyInto in class AbstractElementn - a node of the type of this.protected Node deepCopyInto(Node n)
deepCopyInto in class AbstractElementn - a node of the type of this.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||