fr.lri.swingstates.animations
Class ANamedTag

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

public class ANamedTag
extends AExtensionalTag

A ANamedTag tag is a AExtensionalTag. A ANamedTag tag an be referenced using its key string.

Author:
Caroline Appert
See Also:
AExtensionalTag, ATag, Animation

Constructor Summary
ANamedTag(java.lang.String n)
          Builds a ANamedTag tag.
 
Method Summary
 java.lang.String getName()
          Returns the name of this tag.
static ANamedTag getTag(java.lang.String t)
          Returns the tag object given its name.
static void initForApplet()
          For internal use.
 boolean setName(java.lang.String n)
          Sets the name of this tag.
 
Methods inherited from class fr.lri.swingstates.animations.AExtensionalTag
added, addTo, removed, removeFrom
 
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

ANamedTag

public ANamedTag(java.lang.String n)
Builds a ANamedTag tag. Note that if a tag with the same name already exists, this new tag is not registered, and the results are undefined.

Parameters:
n - The name of the tag
Method Detail

initForApplet

public static void initForApplet()
For internal use. See class SwingStatesApplet.

See Also:
SwingStatesApplet.init()

getTag

public static ANamedTag getTag(java.lang.String t)
Returns the tag object given its name.

Parameters:
t - The name of the tag
Returns:
The tag, or null if no such tag exists.

getName

public java.lang.String getName()
Returns the name of this tag.

Returns:
the name of this tag.

setName

public boolean setName(java.lang.String n)
Sets the name of this tag. The name can only be changed if no existing tag by this name already exists.

Parameters:
n - The name.
Returns:
true if the name could be change, false otherwise.