org.apache.batik.dom.svg

Class SVGStylableElement

public abstract class SVGStylableElement extends SVGOMElement implements CSSStylableElement

This class provides a common superclass for elements which implement SVGStylable.
Nested Class Summary
protected classSVGStylableElement.OverrideStyleDeclaration
This class is a CSSStyleDeclaration for the override style of the element.
classSVGStylableElement.PresentationAttributeColorValue
To manage a presentation attribute SVGColor value.
classSVGStylableElement.PresentationAttributePaintValue
To manage a presentation attribute SVGPaint value.
classSVGStylableElement.PresentationAttributeValue
To manage a presentation attribute value.
classSVGStylableElement.StyleDeclaration
This class represents the 'style' attribute.
Field Summary
protected SVGOMAnimatedStringclassName
The 'class' attribute value.
protected StyleMapcomputedStyleMap
The computed style map.
protected SVGStylableElement.OverrideStyleDeclarationoverrideStyleDeclaration
The override style declaration for this element.
protected SVGStylableElement.StyleDeclarationstyle
The 'style' attribute value.
protected static DoublyIndexedTablexmlTraitInformation
Table mapping XML attribute names to TraitInformation objects.
Constructor Summary
protected SVGStylableElement()
Creates a new SVGStylableElement object.
protected SVGStylableElement(String prefix, AbstractDocument owner)
Creates a new SVGStylableElement object.
Method Summary
voidaddTargetListener(String ns, String an, boolean isCSS, AnimationTargetListener l)
Adds a listener for changes to the given attribute value.
SVGAnimatedStringgetClassName()
DOM: Implements org.w3c.dom.svg.SVGStylable#getClassName().
StyleMapgetComputedStyleMap(String pseudoElement)
Returns the computed style of this element/pseudo-element.
ParsedURLgetCSSBase()
Returns the CSS base URL of this element.
StringgetCSSClass()
Returns the class of this element.
CSSStyleDeclarationgetOverrideStyle()
Returns the override style declaration for this element.
StyleDeclarationProvidergetOverrideStyleDeclarationProvider()
Returns the object that gives access to the underlying StyleDeclaration for the override style of this element.
CSSValuegetPresentationAttribute(String name)
DOM: Implements org.w3c.dom.svg.SVGStylable#getPresentationAttribute(String).
CSSStyleDeclarationgetStyle()
DOM: Implements org.w3c.dom.svg.SVGStylable#getStyle().
protected DoublyIndexedTablegetTraitInformationTable()
Returns the table of TraitInformation objects for this element.
StringgetXMLId()
Returns the ID of this element.
protected voidinitializeAllLiveAttributes()
Initializes all live attributes for this element.
booleanisPseudoInstanceOf(String pseudoClass)
Tells whether this element is an instance of the given pseudo class.
voidremoveTargetListener(String ns, String an, boolean isCSS, AnimationTargetListener l)
Removes a listener for changes to the given attribute value.
voidsetComputedStyleMap(String pseudoElement, StyleMap sm)
Sets the computed style of this element/pseudo-element.
voidupdatePropertyValue(String pn, AnimatableValue val)
Updates a property value in this target.
booleanuseLinearRGBColorInterpolation()
Returns whether color interpolations should be done in linear RGB color space rather than sRGB.

Field Detail

className

protected SVGOMAnimatedString className
The 'class' attribute value.

computedStyleMap

protected StyleMap computedStyleMap
The computed style map.

overrideStyleDeclaration

protected SVGStylableElement.OverrideStyleDeclaration overrideStyleDeclaration
The override style declaration for this element.

style

protected SVGStylableElement.StyleDeclaration style
The 'style' attribute value.

xmlTraitInformation

protected static DoublyIndexedTable xmlTraitInformation
Table mapping XML attribute names to TraitInformation objects.

Constructor Detail

SVGStylableElement

protected SVGStylableElement()
Creates a new SVGStylableElement object.

SVGStylableElement

protected SVGStylableElement(String prefix, AbstractDocument owner)
Creates a new SVGStylableElement object.

Parameters: prefix The namespace prefix. owner The owner document.

Method Detail

addTargetListener

public void addTargetListener(String ns, String an, boolean isCSS, AnimationTargetListener l)
Adds a listener for changes to the given attribute value.

getClassName

public SVGAnimatedString getClassName()
DOM: Implements org.w3c.dom.svg.SVGStylable#getClassName().

getComputedStyleMap

public StyleMap getComputedStyleMap(String pseudoElement)
Returns the computed style of this element/pseudo-element.

getCSSBase

public ParsedURL getCSSBase()
Returns the CSS base URL of this element.

Throws: IllegalArgumentException when the result of getBaseURI() cannot be used as an URL.

getCSSClass

public String getCSSClass()
Returns the class of this element.

getOverrideStyle

public CSSStyleDeclaration getOverrideStyle()
Returns the override style declaration for this element.

getOverrideStyleDeclarationProvider

public StyleDeclarationProvider getOverrideStyleDeclarationProvider()
Returns the object that gives access to the underlying StyleDeclaration for the override style of this element.

getPresentationAttribute

public CSSValue getPresentationAttribute(String name)
DOM: Implements org.w3c.dom.svg.SVGStylable#getPresentationAttribute(String).

getStyle

public CSSStyleDeclaration getStyle()
DOM: Implements org.w3c.dom.svg.SVGStylable#getStyle().

getTraitInformationTable

protected DoublyIndexedTable getTraitInformationTable()
Returns the table of TraitInformation objects for this element.

getXMLId

public String getXMLId()
Returns the ID of this element.

initializeAllLiveAttributes

protected void initializeAllLiveAttributes()
Initializes all live attributes for this element.

isPseudoInstanceOf

public boolean isPseudoInstanceOf(String pseudoClass)
Tells whether this element is an instance of the given pseudo class.

removeTargetListener

public void removeTargetListener(String ns, String an, boolean isCSS, AnimationTargetListener l)
Removes a listener for changes to the given attribute value.

setComputedStyleMap

public void setComputedStyleMap(String pseudoElement, StyleMap sm)
Sets the computed style of this element/pseudo-element.

updatePropertyValue

public void updatePropertyValue(String pn, AnimatableValue val)
Updates a property value in this target.

useLinearRGBColorInterpolation

public boolean useLinearRGBColorInterpolation()
Returns whether color interpolations should be done in linear RGB color space rather than sRGB.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.