|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.examples.LineBuilder
public class LineBuilder
A utility class to interactively build a polyline. When armed, the class monitors mouse events and adds new postions to a polyline as the user identifies them. The interaction sequence for creating a line is as follows:
setArmed(boolean)
method with an argument of true. LineBuilder
object by calling its setArmed(boolean)
method with an argument of false. LineBuilder
is constructed.
This class contains a main
method implementing an example program illustrating use of
LineBuilder
.
Field Summary |
---|
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl |
---|
changeSupport |
Constructor Summary | |
---|---|
LineBuilder(WorldWindow wwd,
RenderableLayer lineLayer,
Polyline polyline)
Construct a new line builder using the specified polyline and layer and drawing events from the specified world window. |
Method Summary | |
---|---|
void |
clear()
Removes all positions from the polyline. |
RenderableLayer |
getLayer()
Returns the layer holding the polyline being created. |
Polyline |
getLine()
Returns the layer currently used to display the polyline. |
boolean |
isArmed()
Identifies whether the line builder is armed. |
void |
setArmed(boolean armed)
Arms and disarms the line builder. |
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, propertyChange, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LineBuilder(WorldWindow wwd, RenderableLayer lineLayer, Polyline polyline)
wwd
- the world window to draw events from.lineLayer
- the layer holding the polyline. May be null, in which case a new layer is created.polyline
- the polyline object to build. May be null, in which case a new polyline is created.Method Detail |
---|
public void clear()
public RenderableLayer getLayer()
public Polyline getLine()
public boolean isArmed()
public void setArmed(boolean armed)
armed
- true to arm the line builder, false to disarm it.
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |