sm
Class SMHierarchyTag

java.lang.Object
  extended bysm.SMTag
      extended bysm.SMHierarchyTag
All Implemented Interfaces:
InteractiveObject, java.util.Iterator

public class SMHierarchyTag
extends SMTag

A SMHierarchyTag(SMShape s) tags s and every shape whose s is an ancestor.

Author:
Caroline Appert

Constructor Summary
SMHierarchyTag(SMHierarchy h)
          Builds a SMHierarchyTag with the set of shapes contained in a hierarchy.
SMHierarchyTag(SMShape s)
          Builds a SMHierarchyTag with the set composed of s and every shape whose s is an ancestor..
 
Method Summary
 SMHierarchy getHierarchy()
          Returns the collection of this tag as a hierarchy.
 boolean hasNext()
          Tests if there is other shapes tagged by this tag.
 SMShape nextShape()
           
 void reset()
          Inits the tag's iterator.
 
Methods inherited from class sm.SMTag
above, aboveAll, action, action, addGhost, addTag, addTag, and, and, attachSM, below, belowAll, contains, contains, contains, contains, containsPoint, containsPoint, detachSM, firstShape, getAntialiasedShapes, getCanvas, getCollection, getFilledShapes, getFirstAntialiasedShape, getFirstFilledShape, getFirstHavingTag, getFirstOutlinedShape, getGlobalBoundingBox, getOutlinedShapes, hasTag, hasTag, intersects, intersects, isAntialiased, isDrawable, isFilled, isOnOutline, isOutlined, isPickable, next, or, or, remove, removeGhost, removeTag, removeTag, rotateBy, rotateTo, scaleBy, scaleBy, scaleTo, scaleTo, setAntialiased, setClip, setDrawable, setFilled, setFillPaint, setOutlined, setOutlinePaint, setParent, setPickable, setReferencePoint, setShape, setStroke, setTransparency, size, tagsShape, translateBy, translateTo
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMHierarchyTag

public SMHierarchyTag(SMHierarchy h)
Builds a SMHierarchyTag with the set of shapes contained in a hierarchy.

Parameters:
h - The hierarchy.

SMHierarchyTag

public SMHierarchyTag(SMShape s)
Builds a SMHierarchyTag with the set composed of s and every shape whose s is an ancestor..

Parameters:
s - The parent shape of the hierarchy.
Method Detail

reset

public void reset()
Description copied from class: SMTag
Inits the tag's iterator.

Specified by:
reset in class SMTag

hasNext

public boolean hasNext()
Description copied from class: SMTag
Tests if there is other shapes tagged by this tag.

Specified by:
hasNext in interface java.util.Iterator
Specified by:
hasNext in class SMTag
Returns:
Returns true if there is other shapes tagged by this tag, false otherwise.
See Also:
Iterator.hasNext()

getHierarchy

public SMHierarchy getHierarchy()
Returns the collection of this tag as a hierarchy.

Returns:
Returns the hierarchy object
See Also:
SMHierarchy

nextShape

public SMShape nextShape()
Specified by:
nextShape in class SMTag