sm
Class SMAndTag

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

public class SMAndTag
extends SMTag

A SMAndTag is a tag corresponding to the set of shapes tagged by a tag t1 and a tag t2.

Author:
appert

Constructor Summary
SMAndTag(SMTag t1, SMTag t2)
          Builds a SMAndTagtag corresponding to the set of shapes tagged by a tag t1 and a tag t2.
 
Method Summary
 java.util.Collection getCollection()
          Returns a collection containing all the shapes tagged by this tag.
 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, 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

SMAndTag

public SMAndTag(SMTag t1,
                SMTag t2)
Builds a SMAndTagtag corresponding to the set of shapes tagged by a tag t1 and a tag t2.

Parameters:
t1 - The first tag.
t2 - The second tag.
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()

getCollection

public java.util.Collection getCollection()
Returns a collection containing all the shapes tagged by this tag. This method uses the iterator of the two tags, thus it mustn't be used while browsing this tag, the tag t1 or the tag t2.

Overrides:
getCollection in class SMTag
Returns:
Returns a collection containing all the shapes tagged by this tag.

nextShape

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