public class Zoomer
extends java.lang.Object
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
Constructor and Description |
---|
Zoomer(Zoomable zoomableThing,
java.awt.Component zoomableComponent) |
Modifier and Type | Method and Description |
---|---|
int |
appendZoomMenuItems(java.awt.Container menu)
Add menu items associated with zooming into a
pre-existing menu.
|
void |
clearLatestShape() |
ZoomShape |
findLastZoom(int coodinateType) |
ZoomShape |
getTopMostShape() |
PamView.zoomer.Zoomer.ZoomerMouse |
getZoomerMouse() |
boolean |
isInMark(java.awt.Component c,
java.awt.Point pt) |
java.awt.Rectangle |
paintShape(java.awt.Graphics g,
java.awt.Component c,
boolean beforeOther)
Paint the top most shape in the zoom sequence
|
public Zoomer(Zoomable zoomableThing, java.awt.Component zoomableComponent)
public java.awt.Rectangle paintShape(java.awt.Graphics g, java.awt.Component c, boolean beforeOther)
This should be called twice from the paint function of the component hosting the zoom feature, once before other drawing and once after.
g
- graphicsc
- component to draw onbeforeOther
- called before other drawingpublic boolean isInMark(java.awt.Component c, java.awt.Point pt)
pt
- Point on display in pixels.public void clearLatestShape()
public ZoomShape getTopMostShape()
public int appendZoomMenuItems(java.awt.Container menu)
menu
- menupublic PamView.zoomer.Zoomer.ZoomerMouse getZoomerMouse()
public ZoomShape findLastZoom(int coodinateType)