|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPamView.zoomer.Zoomer
public class 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
| Nested Class Summary | |
|---|---|
private class |
Zoomer.ZoomerMouse
|
private class |
Zoomer.ZoomIn
|
private class |
Zoomer.ZoomOut
|
private class |
Zoomer.ZoomRightOut
Zoom right out back to the original scale before zooming |
| Field Summary | |
|---|---|
private java.awt.Point |
mousePressPoint
|
private ZoomPolygon |
newZoomPolygon
|
private ZoomRectangle |
newZoomRectangle
|
private ZoomShape |
topMostShape
|
private java.awt.Component |
zoomableComponent
|
private Zoomable |
zoomableThing
|
private Zoomer.ZoomerMouse |
zoomerMouse
|
private java.util.Vector<ZoomShape> |
zoomShapes
|
| Constructor Summary | |
|---|---|
Zoomer(Zoomable zoomableThing,
java.awt.Component zoomableComponent)
|
|
| Method Summary | |
|---|---|
int |
appendZoomMenuItems(java.awt.Container menu)
Add menu items associated with zooming into a pre-existing menu. |
private boolean |
canZoomOut()
|
void |
clearLatestShape()
|
ZoomShape |
findLastZoom(int coodinateType)
|
Zoomer.ZoomerMouse |
getZoomerMouse()
|
private boolean |
haveZoomBox()
|
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 |
protected double |
pointXtoVal(int x)
Convert a point in pixels to a value for the x scale |
protected double |
pointYtoVal(java.awt.Component c,
int y)
Convert a point in pixels to a value for the y scale |
protected java.awt.Point |
xyValToPoint(java.awt.Component c,
double x,
double y)
|
private void |
zoomIn()
Zoom in to the bounds of the next zoom shape |
private void |
zoomOut()
Zoom out to the bounds of the preceding zoom shape |
private void |
zoomRightOut()
Zoom right out to position of display prior to zooming |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Zoomable zoomableThing
private java.util.Vector<ZoomShape> zoomShapes
private ZoomShape topMostShape
private Zoomer.ZoomerMouse zoomerMouse
private java.awt.Point mousePressPoint
private ZoomRectangle newZoomRectangle
private ZoomPolygon newZoomPolygon
private java.awt.Component zoomableComponent
| Constructor Detail |
|---|
public Zoomer(Zoomable zoomableThing,
java.awt.Component zoomableComponent)
| Method Detail |
|---|
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 drawing
protected java.awt.Point xyValToPoint(java.awt.Component c,
double x,
double y)
protected double pointXtoVal(int x)
x - x in pixels
protected double pointYtoVal(java.awt.Component c,
int y)
y - y in pixels
public boolean isInMark(java.awt.Component c,
java.awt.Point pt)
pt - Point on display in pixels.
public void clearLatestShape()
public int appendZoomMenuItems(java.awt.Container menu)
menu - menu
private boolean haveZoomBox()
private boolean canZoomOut()
private void zoomIn()
private void zoomOut()
private void zoomRightOut()
public Zoomer.ZoomerMouse getZoomerMouse()
public ZoomShape findLastZoom(int coodinateType)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||