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
-
Method Summary
Modifier and TypeMethodDescriptionint
appendZoomMenuItems
(Container menu) Add menu items associated with zooming into a pre-existing menu.void
findLastZoom
(int coodinateType) PamView.zoomer.Zoomer.ZoomerMouse
boolean
paintShape
(Graphics g, Component c, boolean beforeOther) Paint the top most shape in the zoom sequence
-
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.
-
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
-