|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsm.SMTag
sm.SMExtensionalTag
sm.SMNamedTag
A SMNamedTag
tag is a SMVolatileTag
.
A SMNamedTag
tag is a set of shapes having the same label.
Constructor Summary | |
SMNamedTag(java.lang.String n,
SMCanvas c)
Constructs a SMNamedTag tag.
|
Method Summary | |
java.lang.String |
getName()
Returns the name of this tag. |
static SMNamedTag |
getTag(java.lang.String t)
Returns the tag object given its name. |
static java.util.LinkedList |
getTaggedShapes(java.lang.String t)
Returns the list of shapes that have a given tag. |
boolean |
hasNext()
Tests if there is other shapes tagged by this tag. |
SMShape |
nextShape()
|
void |
reset()
Inits the tag's iterator. |
boolean |
setName(java.lang.String n)
Sets the name of this tag. |
Methods inherited from class sm.SMExtensionalTag |
added, addTo, removed, removeFrom |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SMNamedTag(java.lang.String n, SMCanvas c)
SMNamedTag
tag.
Note that if a tag with the same name already exists, this new tag is not registered with the canvas, and the results are undefined.
Use the method SMCanvas#newTag
to create tags to avoid this problem.
This constructor is left public and does not throw an exception in order to make it possible to create anonymous classes derived from Tag
.
n
- The name of the tagMethod Detail |
public static java.util.LinkedList getTaggedShapes(java.lang.String t)
t
- The name of the tag
public static SMNamedTag getTag(java.lang.String t)
t
- The name of the tag
public void reset()
SMTag
reset
in class SMExtensionalTag
public boolean hasNext()
SMTag
hasNext
in interface java.util.Iterator
hasNext
in class SMExtensionalTag
public java.lang.String getName()
public boolean setName(java.lang.String n)
n
- The name.
public SMShape nextShape()
nextShape
in class SMExtensionalTag
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |