gov.nasa.worldwind.examples.shapebuilder
Class AbstractShapeEditor
java.lang.Object
gov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.layers.AbstractLayer
gov.nasa.worldwind.examples.shapebuilder.AbstractShapeEditor
- All Implemented Interfaces:
- AVList, Disposable, MessageListener, Layer, Restorable, WWObject, MouseListener, MouseMotionListener, PropertyChangeListener, EventListener
- Direct Known Subclasses:
- ExtrudedPolygonEditor, RigidShapeEditor
public abstract class AbstractShapeEditor
- extends AbstractLayer
- implements MouseListener, MouseMotionListener
An abstract class defining common functionality and fields for editors used in the RigidShapeBuilder example. These
include field variables and getters and setters for the shape's annotations that are displayed during editing (and
related labels), references to the current WorldWindow and mouse location, flags indicating whether the editor is
currently armed and whether annotations should be shown, as well as fields indicating the current action being
performed, the current editMode, and the current altitudeMode.
In addition, the class contains several helper functions related to displaying annotations, which all editors should
be able to do.
Methods inherited from class gov.nasa.worldwind.layers.AbstractLayer |
createLayerConfigElements, dispose, doPick, doPreRender, doRender, getDataFileStore, getExpiryTime, getLayerConfigParams, getMaxActiveAltitude, getMaxEffectiveAltitude, getMinActiveAltitude, getMinEffectiveAltitude, getName, getOpacity, getRestorableState, getScale, getScreenCredit, isAtMaxResolution, isEnabled, isLayerActive, isLayerConfigDocument, isLayerInView, isMultiResolution, isNetworkRetrievalEnabled, isPickEnabled, pick, preRender, render, restoreState, setDataFileStore, setEnabled, setExpiryTime, setMaxActiveAltitude, setMinActiveAltitude, setName, setNetworkRetrievalEnabled, setOpacity, setPickEnabled, setScreenCredit, toString |
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
Methods inherited from interface gov.nasa.worldwind.avlist.AVList |
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
aboveGround
protected boolean aboveGround
ACCUMULATED_LABEL
public static final String ACCUMULATED_LABEL
- See Also:
- Constant Field Values
activeAction
protected String activeAction
ALTITUDE_LABEL
public static final String ALTITUDE_LABEL
- See Also:
- Constant Field Values
altitudeMode
protected int altitudeMode
ANGLE_LABEL
public static final String ANGLE_LABEL
- Labels used in the annotations which are displayed during editing to show the current value of various shape
parameters. Actual label values are retrieved from the World Wind message resource bundle.
- See Also:
- Constant Field Values
annotation
protected ScreenAnnotation annotation
annotationAttributes
protected AnnotationAttributes annotationAttributes
AREA_LABEL
public static final String AREA_LABEL
- See Also:
- Constant Field Values
armed
protected boolean armed
CENTER_ALTITUDE_LABEL
public static final String CENTER_ALTITUDE_LABEL
- See Also:
- Constant Field Values
CENTER_LATITUDE_LABEL
public static final String CENTER_LATITUDE_LABEL
- See Also:
- Constant Field Values
CENTER_LONGITUDE_LABEL
public static final String CENTER_LONGITUDE_LABEL
- See Also:
- Constant Field Values
EAST_SKEW_LABEL
public static final String EAST_SKEW_LABEL
- See Also:
- Constant Field Values
editMode
protected String editMode
frameTimestamp
protected long frameTimestamp
HEADING_LABEL
public static final String HEADING_LABEL
- See Also:
- Constant Field Values
HEIGHT_LABEL
public static final String HEIGHT_LABEL
- See Also:
- Constant Field Values
LATITUDE_LABEL
public static final String LATITUDE_LABEL
- See Also:
- Constant Field Values
LENGTH_LABEL
public static final String LENGTH_LABEL
- See Also:
- Constant Field Values
LONGITUDE_LABEL
public static final String LONGITUDE_LABEL
- See Also:
- Constant Field Values
MAJOR_AXIS_LABEL
public static final String MAJOR_AXIS_LABEL
- See Also:
- Constant Field Values
MINOR_AXIS_LABEL
public static final String MINOR_AXIS_LABEL
- See Also:
- Constant Field Values
mousePoint
protected Point mousePoint
NORTH_SKEW_LABEL
public static final String NORTH_SKEW_LABEL
- See Also:
- Constant Field Values
PERIMETER_LABEL
public static final String PERIMETER_LABEL
- See Also:
- Constant Field Values
RADIUS_LABEL
public static final String RADIUS_LABEL
- See Also:
- Constant Field Values
ROLL_LABEL
public static final String ROLL_LABEL
- See Also:
- Constant Field Values
showAnnotation
protected boolean showAnnotation
TILT_LABEL
public static final String TILT_LABEL
- See Also:
- Constant Field Values
unitsFormat
protected UnitsFormat unitsFormat
WIDTH_LABEL
public static final String WIDTH_LABEL
- See Also:
- Constant Field Values
wwd
protected WorldWindow wwd
AbstractShapeEditor
public AbstractShapeEditor()
arePositionsRedundant
protected boolean arePositionsRedundant(Position posA,
Position posB)
getAltitudeMode
public int getAltitudeMode()
getAnnotationAttributes
protected AnnotationAttributes getAnnotationAttributes()
getEditMode
public abstract String getEditMode()
getLabel
public String getLabel(String labelName)
getWorldWindow
public WorldWindow getWorldWindow()
initializeAnnotation
protected void initializeAnnotation()
isAboveGround
public boolean isAboveGround()
isArmed
public boolean isArmed()
isShowAnnotation
public boolean isShowAnnotation()
setAboveGround
public void setAboveGround(boolean state)
setAltitudeMode
public void setAltitudeMode(int altitudeMode)
setAnnotationAttributes
protected void setAnnotationAttributes(AnnotationAttributes attributes)
setArmed
public void setArmed(boolean armed)
setEditMode
public abstract void setEditMode(String editMode)
setInitialLabels
protected void setInitialLabels()
setLabel
public void setLabel(String labelName,
String label)
setShape
public abstract void setShape(AbstractShape shape)
setShowAnnotation
public void setShowAnnotation(boolean state)
setWorldWindow
public void setWorldWindow(WorldWindow wwd)
updateAnnotation
public abstract void updateAnnotation(Position pos)