|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ka2ddo.yaac.gui.drawlayer.AbstractDrawable
org.ka2ddo.yaac.gui.drawlayer.Polyline
public class Polyline
This class defines a drawable polyline.
| Constructor Summary | |
|---|---|
Polyline()
Create an empty Polyline. |
|
| Method Summary | |
|---|---|
void |
addVertex(double lat,
double lon)
Add another vertex to this polyline. |
void |
addVertex(java.awt.geom.Point2D pt)
Add another vertex to this polyline |
float |
distance(int x,
int y,
Projection proj)
This computes the nearest distance from this drawable to the specified pixel coordinates. |
double |
getVertexLat(int index)
Gets the latitude of the index-specified vertex in the polyline. |
double |
getVertexLon(int index)
Gets the longitude of the index-specified vertex in the polyline. |
void |
paintDrawable(java.awt.Graphics2D g,
Projection proj)
Render this drawable upon a canvas using the specified Graphics and Projection. |
void |
removeVertex(int index)
Remove the specified vertex from the ordered list of vertices. |
int |
size()
Get the number of vertices in this polyline. |
java.lang.String |
toString()
Returns a string representation of the object. |
| Methods inherited from class org.ka2ddo.yaac.gui.drawlayer.AbstractDrawable |
|---|
getLineColor, getName, getStroke, getStrokeType, paramString, setLineColor, setName, setStroke |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Polyline()
| Method Detail |
|---|
public void addVertex(double lat,
double lon)
lat - latitude of this vertex in degrees Northlon - longitude of this vertex in degrees Eastpublic void addVertex(java.awt.geom.Point2D pt)
pt - Point2D containing a position in decimal degrees North and Eastpublic int size()
public void removeVertex(int index)
throws java.lang.ArrayIndexOutOfBoundsException
index - zero-based index of the vertex to remove
java.lang.ArrayIndexOutOfBoundsException - if the index is not in range to represent a vertex in ths polylinepublic double getVertexLat(int index)
index - zero-based index of the vertex
public double getVertexLon(int index)
index - zero-based index of the vertex
public void paintDrawable(java.awt.Graphics2D g,
Projection proj)
paintDrawable in class AbstractDrawableg - Graphics2D object for rendering the drawableproj - Projection for translating geographic coordinates of the drawable
public float distance(int x,
int y,
Projection proj)
distance in class AbstractDrawablex - int pixel X-coordinatey - int pixel Y-coordinateproj - Projection to translate drawable into screen space
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||