public class Selection extends Object
| Constructor and Description |
|---|
Selection(MapWindow
Create a new Selection for the given window.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int x, int y)
Add the point (x, y) to the current line.
|
void |
add(LineString
Add the denoted LineString to the list of edited geometries.
|
void |
addSelectionChangeListener(SelectionChangeListener
Add a listener that get informed on changes of the selections.
|
void |
close()
If possible (enough points), close the current line to a polygon.
|
void |
fromDegrees()
Rebuild the pixel representations of the lines from the degree instances.
|
void |
fromPixels()
Rebuild the geographic representations of the lines from the pixel instances.
|
GeometryCollection |
getGeometries()
Retrieve the geometries represented by this selection.
|
List |
getGeometriesAsList()
Retrieve the geometries represented by this selection.
|
List |
getGeometriesAsListDegrees()
Retrieve the geometries represented by this selection.
|
void |
remove()
Remove the last point from the current line.
|
void |
remove(int index)
Remove the element at the denoted index position from the list of geometries.
|
void |
removeSelectionChangeListener(SelectionChangeListener
Remove a listener from the list of selection listeners.
|
void |
setEditedGeometry(int index)
Set the currently edited geometry to the one referenced by the denoted index.
|
public Selection(MapWindowwindow)
window - the window to use for the selection. The window is necessary to transform between pixel and geographic values
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 remove()
public void close()
public GeometryCollectiongetGeometries()
public List<Geometry > getGeometriesAsList()
public List<Geometry > getGeometriesAsListDegrees()
public void fromDegrees()
public void fromPixels()
public void addSelectionChangeListener(SelectionChangeListenerlistener)
listener - the listener to add.
public void removeSelectionChangeListener(SelectionChangeListenerlistener)
listener - the listener to remove.
public void add(LineStringstring)
string - the LineString to add.
public void remove(int index)
index - the index of the geometry to remove.
public void setEditedGeometry(int index)
index - the index of the geometry to edit.