|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPamView.zoomer.ZoomShape
public abstract class ZoomShape
Interface to support a variety of zoomable shapes.
I currently can't think of anything but a rectangle and an arbitrary polygon, but you never know !
| Field Summary | |
|---|---|
private boolean |
closed
|
private int |
coordinateType
|
private Zoomer |
zoomer
|
| Constructor Summary | |
|---|---|
ZoomShape(Zoomer zoomer,
int coordinateType)
|
|
| Method Summary | |
|---|---|
void |
closeShape()
Shape is complete for whatever reason. |
abstract boolean |
containsPoint(java.awt.Component component,
java.awt.Point pt)
Shape contains the point pt. |
abstract java.awt.Rectangle |
drawShape(java.awt.Graphics g,
java.awt.Component component,
boolean beforeOther)
Draw the shape using the given graphics handle on the given component. |
abstract java.awt.Rectangle |
getBounds(java.awt.Component component)
|
int |
getCoordinateType()
Get the type of coordinate (only needs to be specific within a particular display, not more generally. |
abstract double |
getXLength()
|
abstract double |
getXStart()
|
abstract double |
getYLength()
|
abstract double |
getYStart()
|
Zoomer |
getZoomer()
|
boolean |
isClosed()
|
abstract void |
newPoint(double x,
double y)
New point to add to the shape - or update old point if it's a rectangle. |
abstract boolean |
removeOnZoom()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int coordinateType
private Zoomer zoomer
private boolean closed
| Constructor Detail |
|---|
public ZoomShape(Zoomer zoomer,
int coordinateType)
zoomer - coordinateType - | Method Detail |
|---|
public abstract java.awt.Rectangle getBounds(java.awt.Component component)
public abstract java.awt.Rectangle drawShape(java.awt.Graphics g,
java.awt.Component component,
boolean beforeOther)
g - graphicscomponent - component to draw onbeforeOther -
public abstract void newPoint(double x,
double y)
x - x coordinate in display units such as time or bearing, NOT PIXELSy - y coordinate in display units such as time or bearing, NOT PIXELSpublic void closeShape()
public boolean isClosed()
public abstract boolean removeOnZoom()
Basically true for rectangles, false for polygons.
public abstract boolean containsPoint(java.awt.Component component,
java.awt.Point pt)
Note that these are in screen pixel coordinates.
Component - componentpt - point
public abstract double getXStart()
public abstract double getXLength()
public abstract double getYStart()
public abstract double getYLength()
public int getCoordinateType()
public Zoomer getZoomer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||