jview
Interface NormalizedShapes

All Known Implementing Classes:
JAltAzTelescope, JBoxedCanvas, JCameraCanvas, JDataCanvas, JExpressionCanvas, JFilterWheel, JFitsCanvas, JFrameCanvas, JGuiderCanvas, JGuiderOffsets, JNight, JNormalizedCanvas, JQuadrants, JSkyCanvas, JSkyGrid, JTargetHistory, JTrackingFrequencies, JViewportCanvas, JWeatherCanvas

public interface NormalizedShapes

An interface indicating that a component deals with normalized shapes that implement Centerable. Shapes in that respect means ShapeDraw, TextDraw, and PointDraw instances. Methods for selecting these objects are provided.


Method Summary
<T extends Centerable>
T
getClosestShape(Point2D norm, Class<T> oftype)
          Locates the Centerable of the specified type that is closest to the given normalized point.
<T extends Centerable>
Collection<T>
getInsideShapes(Rectangle2D norm, Class<T> oftype)
          Returns all Centerables of the specified type that have their center within the specified Rectangle.
 

Method Detail

getClosestShape

<T extends Centerable> T getClosestShape(Point2D norm,
                                         Class<T> oftype)
Locates the Centerable of the specified type that is closest to the given normalized point.

Parameters:
norm - The point-of-interest in normalized coordinates.

getInsideShapes

<T extends Centerable> Collection<T> getInsideShapes(Rectangle2D norm,
                                                     Class<T> oftype)
Returns all Centerables of the specified type that have their center within the specified Rectangle. Returns null if the type is unknown and an empty collection if there are no Centerables within the rectangle.

Parameters:
norm - The bounding rectangle in normalized coordinates.