fr.lri.swingstates.animations
Class AExtensionalTag

java.lang.Object
  extended by fr.lri.swingstates.sm.Tag
      extended by fr.lri.swingstates.animations.ATag
          extended by fr.lri.swingstates.animations.AExtensionalTag
All Implemented Interfaces:
java.util.Iterator
Direct Known Subclasses:
ANamedTag

public class AExtensionalTag
extends ATag

A AExtensionalTag tag is a tag that can be explicitely attached to and detached from an animation, i.e. an animation can be added to or removed to the tag's collection.

Author:
Caroline Appert
See Also:
ATag, Animation

Constructor Summary
AExtensionalTag()
          Builds a AExtensionalTag that can tag the animations.
 
Method Summary
 void added(Animation a)
          Method called when this tag is added to a Animation.
 AExtensionalTag addTo(Animation a)
          Adds this tag to a given Animation.
 void removed(Animation a)
          Method called when this tag is removed from an Animation.
 AExtensionalTag removeFrom(Animation a)
          Removes this tag from a given Animation.
 
Methods inherited from class fr.lri.swingstates.animations.ATag
action, action, addTag, addTag, hasNext, next, nextAnimation, removeTag, removeTag, reset, resume, setAnimatedElement, setDelay, setDurationLap, setFunction, setNbLaps, start, stop, suspend, tagsAnimation
 
Methods inherited from class fr.lri.swingstates.sm.Tag
getCollection, remove, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AExtensionalTag

public AExtensionalTag()
Builds a AExtensionalTag that can tag the animations.

See Also:
Animation
Method Detail

added

public void added(Animation a)
Method called when this tag is added to a Animation. By default, this method does nothing. Redefine it in a subclass to specify side effects, such as changing the delay of the attached Animation.

Parameters:
a - The animation

removed

public void removed(Animation a)
Method called when this tag is removed from an Animation. By default, this method does nothing. Redefine it in a subclass to specify side effects, such as changing the delay of the attached Animation.

Parameters:
a - The animation.

addTo

public AExtensionalTag addTo(Animation a)
Adds this tag to a given Animation. This method calls added(Animation), which can be redefined in subclasses to specify side effects, such as changing the delay of the attached animation when the tag is added.

Parameters:
a - The animation
Returns:
this tag
See Also:
added(Animation)

removeFrom

public AExtensionalTag removeFrom(Animation a)
Removes this tag from a given Animation. This method calls removed(Animation), which can be redefined in subclasses to specify side effects, such as changing the delay of the attached animation when the tag is removed.

Parameters:
a - The animation
Returns:
this tag
See Also:
removed(Animation)