diva.canvas
Interface FigureSet

All Known Subinterfaces:
FigureContainer, GeometricSet, ZList
All Known Implementing Classes:
AbstractFigureContainer, ArcManipulator, AttributeBoundsManipulator, BasicEdgeHighlighter, BasicHighlighter, BasicZList, BasicZList.EnclosedGSet, BasicZList.GSet, BasicZList.IntersectedGSet, BoundsManipulator, CircleManipulator, CompositeFigure, ConnectorManipulator, FigureDecorator, FigureLayer, Manipulator, PathManipulator, TypedDecorator

public interface FigureSet

The FigureSet interface is the interface implemented by any class that contain references to a set of figures. Some of the operations are noted as optional -- implementors can throw an UnsupportedOperation exception if these methods do not make sense for them.

Version:
$Id: FigureSet.java 38798 2005-07-08 20:00:01Z cxh $
Author:
John Reekie
Accepted Rating:
Yellow

Method Summary
 boolean contains(Figure f)
          Test if this set contains the given figure.
 java.util.Iterator figures()
          Return an iteration of the figures in this set, in an undefined order.
 java.util.Iterator figuresFromBack()
          Return an iteration of the figures in this set, from back to front.
 java.util.Iterator figuresFromFront()
          Return an iteration of the figures in this set, from back to front.
 

Method Detail

contains

boolean contains(Figure f)
Test if this set contains the given figure. As a general rule, the implementation of this method is not required to be efficient -- O(n) in the length of the list is acceptable. Clients should note that, in general, a much better way of making this same test is to check if the parent of the figure is the same object as this set.


figures

java.util.Iterator figures()
Return an iteration of the figures in this set, in an undefined order. Generally, an implementor will return figures from front to back, but if there is a substantially more efficient way of returning them, then the implementor can use that.


figuresFromBack

java.util.Iterator figuresFromBack()
Return an iteration of the figures in this set, from back to front. This is the order in which figures should normally be painted.


figuresFromFront

java.util.Iterator figuresFromFront()
Return an iteration of the figures in this set, from back to front. This is the order in which events should normally be intercepted.