diva.canvas
Interface FigureSet

All Known Subinterfaces:
FigureContainer, GeometricSet, ZList
All Known Implementing Classes:
AbstractFigureContainer, ArcManipulator, BackgroundedCompositeFigure, BasicHighlighter, BasicZList, BoundsManipulator, CircleManipulator, CompositeFigure, ConnectorManipulator, DrawCompositeFigure, FigureDecorator, FigureLayer, ImageFigureGroup, InterpolatedCurveManipulator, Manipulator, PathManipulator, RangeManipulator, 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:
$Revision: 1.7 $
Author:
John Reekie

Method Summary
 boolean contains(Figure f)
          Test if this set contains the given figure.
 Iterator figures()
          Return an iteration of the figures in this set, in an undefined order.
 Iterator figuresFromBack()
          Return an iteration of the figures in this set, from back to front.
 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

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

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

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.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.