public class LineEditor extends Object
| Constructor and Description |
|---|
LineEditor(MapWindow
Create a new line editor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int x, int y)
Add the point (x,y) to the list of points.
|
boolean |
canClose()
|
void |
close()
If possible, close the line to a polygon by connecting the last point with the first one.
|
void |
fromDegrees()
Rebuild the pixel representation of the geometry by the geographic representation.
|
void |
fromPixels()
Rebuild the geographic representation of the geometry by the pixel representation.
|
Geometry |
getGeometryDegrees()
|
Geometry |
getGeometryPixels()
|
boolean |
isClosed()
|
boolean |
isEmpty()
|
void |
removeLast()
If possible remove the last point.
|
void |
setLineDegrees(LineString
Set this LineEditor's geometry to the denoted string.
|
public LineEditor(MapWindowwindow)
window - the window to use for transformations from pixel to geographic space.
public void add(int x,
int y)
x - the x coordinate of the new point.
y - the y coordinate of the new point.
public void removeLast()
public void close()
public boolean canClose()
public boolean isClosed()
public boolean isEmpty()
public GeometrygetGeometryPixels()
public GeometrygetGeometryDegrees()
public void fromDegrees()
public void fromPixels()
public void setLineDegrees(LineStringstring)
string - the LineString to edit.