|
||||||||||
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 smil.ElementTimeControl . |
boolean |
beginElementAt(float offset)
DOM: Implements smil.ElementTimeControl . |
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 smil.ElementTimeControl . |
boolean |
endElementAt(float offset)
DOM: Implements smil.ElementTimeControl . |
Rectangle2D |
getBBox()
Returns the tight bounding box in current user space (i.e., after application of the transform attribute, if any) on the geometry of all contained graphics elements, exclusive of stroke-width and filter effects). |
AffineTransform |
getCTM()
Returns the transformation matrix from current user units (i.e., after application of the transform attribute, if any) to the viewport coordinate system for the nearestViewportElement. |
float |
getCurrentTime()
DOM: Implements svg.SVGAnimationElement . |
float |
getFontSize()
Returns the font-size on the associated element. |
AffineTransform |
getGlobalTransform()
Returns the global transformation matrix from the current element to the root. |
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()
Returns the transform from the global transform space to pixels. |
float |
getSimpleDuration()
DOM: Implements svg.SVGAnimationElement . |
float |
getStartTime()
DOM: Implements svg.SVGAnimationElement . |
SVGElement |
getTargetElement()
DOM: Implements svg.SVGAnimationElement . |
TimedElement |
getTimedElement()
Returns the TimedElement for the animation. |
AnimatableValue |
getUnderlyingValue()
Returns the underlying value of the animated attribute. |
float |
getViewportHeight()
Returns the height of the viewport which directly contains the associated element. |
float |
getViewportWidth()
Returns the width of the viewport which directly contains the associated element. |
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)
Sets the transform to be used from the global transform space to pixels. |
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 GenericBridge
ctx
- 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 BridgeUpdateHandler
public void handleDOMNodeInsertedEvent(MutationEvent evt)
handleDOMNodeInsertedEvent
in interface BridgeUpdateHandler
public void handleDOMNodeRemovedEvent(MutationEvent evt)
handleDOMNodeRemovedEvent
in interface BridgeUpdateHandler
public void handleDOMCharacterDataModified(MutationEvent evt)
handleDOMCharacterDataModified
in interface BridgeUpdateHandler
public void handleCSSEngineEvent(CSSEngineEvent evt)
handleCSSEngineEvent
in interface BridgeUpdateHandler
public void handleAnimatedAttributeChanged(AnimatedLiveAttributeValue alav)
handleAnimatedAttributeChanged
in interface BridgeUpdateHandler
public void handleOtherAnimationChanged(String type)
handleOtherAnimationChanged
in interface BridgeUpdateHandler
public void dispose()
dispose
in interface BridgeUpdateHandler
public float getPixelUnitToMillimeter()
getPixelUnitToMillimeter
in interface SVGContext
public float getPixelToMM()
getPixelToMM
in interface SVGContext
getPixelUnitToMillimeter()
public Rectangle2D getBBox()
SVGContext
getBBox
in interface SVGContext
public AffineTransform getScreenTransform()
SVGContext
getScreenTransform
in interface SVGContext
public void setScreenTransform(AffineTransform at)
SVGContext
setScreenTransform
in interface SVGContext
public AffineTransform getCTM()
SVGContext
getCTM
in interface SVGContext
public AffineTransform getGlobalTransform()
SVGContext
getGlobalTransform
in interface SVGContext
public float getViewportWidth()
SVGContext
getViewportWidth
in interface SVGContext
public float getViewportHeight()
SVGContext
getViewportHeight
in interface SVGContext
public float getFontSize()
SVGContext
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 SVGElement getTargetElement()
svg.SVGAnimationElement
.
getTargetElement
in interface SVGAnimationContext
public float getStartTime()
svg.SVGAnimationElement
.
getStartTime
in interface SVGAnimationContext
public float getCurrentTime()
svg.SVGAnimationElement
.
getCurrentTime
in interface SVGAnimationContext
public float getSimpleDuration()
svg.SVGAnimationElement
. With the
difference that an indefinite simple duration is returned as
TimedElement.INDEFINITE
, rather than throwing an exception.
getSimpleDuration
in interface SVGAnimationContext
public float getHyperlinkBeginTime()
NaN
if there is no
such begin time.
getHyperlinkBeginTime
in interface SVGAnimationContext
public boolean beginElement() throws DOMException
smil.ElementTimeControl
.
DOMException
public boolean beginElementAt(float offset) throws DOMException
smil.ElementTimeControl
.
DOMException
public boolean endElement() throws DOMException
smil.ElementTimeControl
.
DOMException
public boolean endElementAt(float offset) throws DOMException
smil.ElementTimeControl
.
DOMException
protected boolean isConstantAnimation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |