Package PamView.zoomer
Class Zoomer
java.lang.Object
PamView.zoomer.Zoomer
Class for handling multiple zoom and marked areas on a
 display. 
The zoomer will generally handle both dragged rectangular zoom boxes and also more complicated polygons created by double clicking at a start point and then repeatedly single clicking until back at the start point
- Author:
 - Doug Gillespie
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionintappendZoomMenuItems(Container menu) Add menu items associated with zooming into a pre-existing menu.voidfindLastZoom(int coodinateType) PamView.zoomer.Zoomer.ZoomerMousebooleanpaintShape(Graphics g, Component c, boolean beforeOther) Paint the top most shape in the zoom sequenceprotected doublepointXtoVal(int x) Convert a point in pixels to a value for the x scaleprotected doublepointYtoVal(Component c, int y) Convert a point in pixels to a value for the y scaleprotected PointxyValToPoint(Component c, double x, double y)  
- 
Constructor Details
- 
Zoomer
 
 - 
 - 
Method Details
- 
paintShape
Paint the top most shape in the zoom sequenceThis should be called twice from the paint function of the component hosting the zoom feature, once before other drawing and once after.
- Parameters:
 g- graphicsc- component to draw onbeforeOther- called before other drawing- Returns:
 - outer rectangle of drawing.
 
 - 
xyValToPoint
 - 
pointXtoVal
protected double pointXtoVal(int x) Convert a point in pixels to a value for the x scale- Parameters:
 x- x in pixels- Returns:
 - scaled value in units such as time, bearing, etc.
 
 - 
pointYtoVal
Convert a point in pixels to a value for the y scale- Parameters:
 y- y in pixels- Returns:
 - scaled value in units such as time, bearing, etc.
 
 - 
isInMark
- Parameters:
 pt- Point on display in pixels.- Returns:
 - true if there is no mark or if the click is within the marked region
 
 - 
clearLatestShape
public void clearLatestShape() - 
getTopMostShape
- Returns:
 - the topMostShape
 
 - 
appendZoomMenuItems
Add menu items associated with zooming into a pre-existing menu.- Parameters:
 menu- menu- Returns:
 - number of items added.
 
 - 
getZoomerMouse
public PamView.zoomer.Zoomer.ZoomerMouse getZoomerMouse()- Returns:
 - the zoomerMouse
 
 - 
findLastZoom
 
 -