|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.batik.bridge.AbstractSVGBridge
org.apache.batik.bridge.SVGAnimationElementBridge
public abstract class SVGAnimationElementBridge
An abstract base class for the SVG animation element bridges.
| Nested Class Summary | |
|---|---|
protected class |
SVGAnimationElementBridge.SVGTimedElement
A TimedElement class for SVG animation elements. |
| Field Summary | |
|---|---|
protected AbstractAnimation |
animation
The animation object that provides the values for the animation. |
protected AnimationTarget |
animationTarget
The AnimationTarget the provides a context to the animation engine. |
protected short |
animationType
The animation type. |
protected String |
attributeLocalName
The local name of the attribute or the name of the property being animated. |
protected String |
attributeNamespaceURI
The namespace URI of the attribute being animated. |
protected BridgeContext |
ctx
The BridgeContext to be used. |
protected SVGOMElement |
element
The animation element. |
protected SVGAnimationEngine |
eng
The AnimationEngine that manages all of the animations in the document. |
protected SVGOMElement |
targetElement
The target element of the animation. |
protected TimedElement |
timedElement
The TimedElement object that provides the timing for the animation. |
| Fields inherited from interface org.apache.batik.dom.svg.SVGContext |
|---|
PERCENTAGE_FONT_SIZE, PERCENTAGE_VIEWPORT_HEIGHT, PERCENTAGE_VIEWPORT_SIZE, PERCENTAGE_VIEWPORT_WIDTH |
| Constructor Summary | |
|---|---|
SVGAnimationElementBridge()
|
|
| Method Summary | |
|---|---|
void |
addTargetListener(String pn,
AnimationTargetListener l)
Adds a listener for changes to the given attribute value. |
boolean |
beginElement()
DOM: Implements ElementTimeControl.beginElement(). |
boolean |
beginElementAt(float offset)
DOM: Implements ElementTimeControl.beginElementAt(float). |
protected abstract boolean |
canAnimateType(int type)
Returns whether the animation element being handled by this bridge can animate attributes of the specified type. |
protected boolean |
checkValueType(AnimatableValue v)
Returns whether the specified AnimatableValue is of a type allowed
by this animation. |
protected abstract AbstractAnimation |
createAnimation(AnimationTarget t)
Creates the animation object for the animation element. |
protected TimedElement |
createTimedElement()
Creates a TimedElement for the animation element. |
void |
dispose()
Disposes this BridgeUpdateHandler and releases all resources. |
boolean |
endElement()
DOM: Implements ElementTimeControl.endElement(). |
boolean |
endElementAt(float offset)
DOM: Implements ElementTimeControl.endElementAt(float). |
Rectangle2D |
getBBox()
|
AffineTransform |
getCTM()
|
float |
getCurrentTime()
DOM: Implements SVGAnimationElement.getCurrentTime(). |
float |
getFontSize()
|
AffineTransform |
getGlobalTransform()
|
float |
getHyperlinkBeginTime()
Returns the time that the document would seek to if this animation element were hyperlinked to, or NaN if there is no
such begin time. |
float |
getPixelToMM()
Returns the size of a px CSS unit in millimeters. |
float |
getPixelUnitToMillimeter()
Returns the size of a px CSS unit in millimeters. |
AffineTransform |
getScreenTransform()
|
float |
getSimpleDuration()
DOM: Implements SVGAnimationElement.getSimpleDuration(). |
float |
getStartTime()
DOM: Implements SVGAnimationElement.getStartTime(). |
org.w3c.dom.svg.SVGElement |
getTargetElement()
DOM: Implements SVGAnimationElement.getTargetElement(). |
TimedElement |
getTimedElement()
Returns the TimedElement for the animation. |
AnimatableValue |
getUnderlyingValue()
Returns the underlying value of the animated attribute. |
float |
getViewportHeight()
|
float |
getViewportWidth()
|
void |
handleAnimatedAttributeChanged(AnimatedLiveAttributeValue alav)
Invoked when the animated value of an animatable attribute has changed. |
void |
handleCSSEngineEvent(CSSEngineEvent evt)
Invoked when an CSSEngineEvent is fired. |
void |
handleDOMAttrModifiedEvent(MutationEvent evt)
Invoked when an MutationEvent of type 'DOMAttrModified' is fired. |
void |
handleDOMCharacterDataModified(MutationEvent evt)
Invoked when an MutationEvent of type 'DOMCharacterDataModified' is fired. |
void |
handleDOMNodeInsertedEvent(MutationEvent evt)
Invoked when an MutationEvent of type 'DOMNodeInserted' is fired. |
void |
handleDOMNodeRemovedEvent(MutationEvent evt)
Invoked when an MutationEvent of type 'DOMNodeRemoved' is fired. |
void |
handleElement(BridgeContext ctx,
Element e)
Handles this animation element. |
void |
handleOtherAnimationChanged(String type)
Invoked when an 'other' animation value has changed. |
protected void |
initializeAnimation()
Parses the animation element's target attributes and adds it to the document's AnimationEngine. |
protected void |
initializeTimedElement()
Parses the animation element's timing attributes and initializes the SVGAnimationElementBridge.SVGTimedElement object. |
protected void |
initializeTimedElement(TimedElement timedElement)
Initializes the timing attributes of the timed element. |
protected boolean |
isConstantAnimation()
Returns whether this is a constant animation (i.e., a 'set' animation). |
protected AnimatableValue |
parseAnimatableValue(String an)
Parses an attribute as an AnimatableValue. |
void |
removeTargetListener(String pn,
AnimationTargetListener l)
Removes a listener for changes to the given attribute value. |
void |
setScreenTransform(AffineTransform at)
|
float |
svgToUserSpace(float v,
int type,
int pcInterp)
|
| Methods inherited from class org.apache.batik.bridge.AbstractSVGBridge |
|---|
getInstance, getNamespaceURI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.batik.bridge.Bridge |
|---|
getInstance, getLocalName, getNamespaceURI |
| Field Detail |
|---|
protected SVGOMElement element
protected BridgeContext ctx
protected SVGAnimationEngine eng
protected TimedElement timedElement
protected AbstractAnimation animation
protected String attributeNamespaceURI
protected String attributeLocalName
protected short animationType
ANIM_TYPE_*
constants defined in AnimationEngine.
protected SVGOMElement targetElement
protected AnimationTarget animationTarget
| Constructor Detail |
|---|
public SVGAnimationElementBridge()
| Method Detail |
|---|
public TimedElement getTimedElement()
public AnimatableValue getUnderlyingValue()
getUnderlyingValue in interface AnimatableElement
public void handleElement(BridgeContext ctx,
Element e)
handleElement in interface GenericBridgectx - the bridge context to usee - the element being handledprotected void initializeAnimation()
protected abstract boolean canAnimateType(int type)
type - one of the TYPE_ constants defined in SVGTypes.protected boolean checkValueType(AnimatableValue v)
AnimatableValue is of a type allowed
by this animation.
protected void initializeTimedElement()
SVGAnimationElementBridge.SVGTimedElement object.
protected TimedElement createTimedElement()
protected abstract AbstractAnimation createAnimation(AnimationTarget t)
protected AnimatableValue parseAnimatableValue(String an)
protected void initializeTimedElement(TimedElement timedElement)
public void handleDOMAttrModifiedEvent(MutationEvent evt)
handleDOMAttrModifiedEvent in interface BridgeUpdateHandlerpublic void handleDOMNodeInsertedEvent(MutationEvent evt)
handleDOMNodeInsertedEvent in interface BridgeUpdateHandlerpublic void handleDOMNodeRemovedEvent(MutationEvent evt)
handleDOMNodeRemovedEvent in interface BridgeUpdateHandlerpublic void handleDOMCharacterDataModified(MutationEvent evt)
handleDOMCharacterDataModified in interface BridgeUpdateHandlerpublic void handleCSSEngineEvent(CSSEngineEvent evt)
handleCSSEngineEvent in interface BridgeUpdateHandlerpublic void handleAnimatedAttributeChanged(AnimatedLiveAttributeValue alav)
handleAnimatedAttributeChanged in interface BridgeUpdateHandlerpublic void handleOtherAnimationChanged(String type)
handleOtherAnimationChanged in interface BridgeUpdateHandlerpublic void dispose()
dispose in interface BridgeUpdateHandlerpublic float getPixelUnitToMillimeter()
getPixelUnitToMillimeter in interface SVGContextpublic float getPixelToMM()
getPixelToMM in interface SVGContextgetPixelUnitToMillimeter()public Rectangle2D getBBox()
getBBox in interface SVGContextpublic AffineTransform getScreenTransform()
getScreenTransform in interface SVGContextpublic void setScreenTransform(AffineTransform at)
setScreenTransform in interface SVGContextpublic AffineTransform getCTM()
getCTM in interface SVGContextpublic AffineTransform getGlobalTransform()
getGlobalTransform in interface SVGContextpublic float getViewportWidth()
getViewportWidth in interface SVGContextpublic float getViewportHeight()
getViewportHeight in interface SVGContextpublic float getFontSize()
getFontSize in interface SVGContext
public float svgToUserSpace(float v,
int type,
int pcInterp)
public void addTargetListener(String pn,
AnimationTargetListener l)
public void removeTargetListener(String pn,
AnimationTargetListener l)
public org.w3c.dom.svg.SVGElement getTargetElement()
SVGAnimationElement.getTargetElement().
getTargetElement in interface SVGAnimationContextpublic float getStartTime()
SVGAnimationElement.getStartTime().
getStartTime in interface SVGAnimationContextpublic float getCurrentTime()
SVGAnimationElement.getCurrentTime().
getCurrentTime in interface SVGAnimationContextpublic float getSimpleDuration()
SVGAnimationElement.getSimpleDuration(). With the
difference that an indefinite simple duration is returned as
TimedElement.INDEFINITE, rather than throwing an exception.
getSimpleDuration in interface SVGAnimationContextpublic float getHyperlinkBeginTime()
NaN if there is no
such begin time.
getHyperlinkBeginTime in interface SVGAnimationContext
public boolean beginElement()
throws DOMException
ElementTimeControl.beginElement().
beginElement in interface org.w3c.dom.smil.ElementTimeControlDOMException
public boolean beginElementAt(float offset)
throws DOMException
ElementTimeControl.beginElementAt(float).
beginElementAt in interface org.w3c.dom.smil.ElementTimeControlDOMException
public boolean endElement()
throws DOMException
ElementTimeControl.endElement().
endElement in interface org.w3c.dom.smil.ElementTimeControlDOMException
public boolean endElementAt(float offset)
throws DOMException
ElementTimeControl.endElementAt(float).
endElementAt in interface org.w3c.dom.smil.ElementTimeControlDOMExceptionprotected boolean isConstantAnimation()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||