org.apache.batik.dom.svg
public abstract class SVGOMElement extends AbstractElement implements SVGElement, ExtendedTraitAccess, AnimationTarget
Nested Class Summary | |
---|---|
protected class | SVGOMElement.UnitContext
To resolve the units. |
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. |
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. |
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(SVGAnimatedInteger n, SVGAnimatedInteger on)
Returns an AnimatableNumberOptionalNumberValue for the base value of
the given two SVGAnimatedIntegers. |
protected AnimatableValue | getBaseValue(SVGAnimatedNumber n, 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(). |
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. |
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. |
Parameters: prefix The namespace prefix. owner The owner document.
Parameters: n a node of the type of this.
Parameters: n a node of the type of this.
Parameters: ctx the SVG context
Parameters: v the SVG length value type the SVG length units (one of the SVGLength.SVG_LENGTH_* constants) pcInterp how to interpretet percentage values (one of the SVGContext.PERCENTAGE_* constants)
Returns: the SVG value in user units