public class ExtrudedPolygonEditor extends AbstractShapeEditor
Modifier and Type | Class and Description |
---|---|
protected static class |
ExtrudedPolygonEditor.ControlPointMarker |
Modifier and Type | Field and Description |
---|---|
protected ExtrudedPolygonEditor.ControlPointMarker |
activeControlPoint |
protected int |
activeControlPointIndex |
static java.lang.String |
CHANGE_HEIGHT_ACTION |
protected BasicMarkerAttributes |
heightControlAttributes |
protected MarkerRenderer |
markerRenderer |
static java.lang.String |
MOVE_POLYGON_ACTION |
static java.lang.String |
MOVE_VERTEX_ACTION |
protected ExtrudedPolygon |
polygon |
protected BasicMarkerAttributes |
vertexControlAttributes |
aboveGround, ACCUMULATED_LABEL, activeAction, ALTITUDE_LABEL, altitudeMode, ANGLE_LABEL, annotation, annotationAttributes, AREA_LABEL, armed, CENTER_ALTITUDE_LABEL, CENTER_LATITUDE_LABEL, CENTER_LONGITUDE_LABEL, EAST_SKEW_LABEL, editMode, frameTimestamp, HEADING_LABEL, HEIGHT_LABEL, LATITUDE_LABEL, LENGTH_LABEL, LONGITUDE_LABEL, MAJOR_AXIS_LABEL, MINOR_AXIS_LABEL, mousePoint, NORTH_SKEW_LABEL, PERIMETER_LABEL, RADIUS_LABEL, ROLL_LABEL, showAnnotation, TILT_LABEL, unitsFormat, WIDTH_LABEL, wwd
Constructor and Description |
---|
ExtrudedPolygonEditor() |
Modifier and Type | Method and Description |
---|---|
protected void |
addVertex(java.awt.Point mousePoint)
Add a vertex to the polygon's outer boundary.
|
protected void |
assembleControlPoints(DrawContext dc) |
protected void |
assembleHeightControlPoints() |
protected void |
assembleMarkerAttributes() |
protected void |
assembleVertexControlPoints(DrawContext dc) |
protected Vec4 |
computeAnnotationPosition(Position pos) |
protected void |
doPick(DrawContext dc,
java.awt.Point point) |
protected void |
doRender(DrawContext dc) |
protected java.lang.String |
formatMeasurements(Position pos) |
protected java.lang.String |
getDisplayString(Position pos) |
java.lang.String |
getEditMode() |
ExtrudedPolygon |
getPolygon() |
protected Vec4 |
intersectPolygonAltitudeAt(Line ray)
Determine the point at which a ray intersects a the globe at the elevation of the polygon.
|
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
protected void |
moveControlPoint(ExtrudedPolygonEditor.ControlPointMarker controlPoint,
java.awt.Point lastMousePoint,
java.awt.Point moveToPoint) |
protected void |
movePolygon(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
removeVertex(ExtrudedPolygonEditor.ControlPointMarker vertexToRemove)
Remove a vertex from the polygon.
|
void |
setEditMode(java.lang.String editMode) |
void |
setPolygon(ExtrudedPolygon polygon) |
protected void |
setPolygonHeight(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
void |
setShape(AbstractShape shape) |
void |
updateAnnotation(Position pos) |
arePositionsRedundant, getAltitudeMode, getAnnotationAttributes, getLabel, getWorldWindow, initializeAnnotation, isAboveGround, isArmed, isShowAnnotation, setAboveGround, setAltitudeMode, setAnnotationAttributes, setArmed, setInitialLabels, setLabel, setShowAnnotation, setWorldWindow
createLayerConfigElements, dispose, doPreRender, 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
onMessage, propertyChange
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
onMessage
protected ExtrudedPolygonEditor.ControlPointMarker activeControlPoint
protected int activeControlPointIndex
public static final java.lang.String CHANGE_HEIGHT_ACTION
protected BasicMarkerAttributes heightControlAttributes
protected MarkerRenderer markerRenderer
public static final java.lang.String MOVE_POLYGON_ACTION
public static final java.lang.String MOVE_VERTEX_ACTION
protected ExtrudedPolygon polygon
protected BasicMarkerAttributes vertexControlAttributes
protected void addVertex(java.awt.Point mousePoint)
mousePoint
- the point at which the mouse was clicked. The new vertex will be placed as near as possible to
this point, at the elevation of the polygon.protected void assembleControlPoints(DrawContext dc)
protected void assembleHeightControlPoints()
protected void assembleMarkerAttributes()
protected void assembleVertexControlPoints(DrawContext dc)
protected void doPick(DrawContext dc, java.awt.Point point)
doPick
in class AbstractLayer
protected void doRender(DrawContext dc)
doRender
in class AbstractLayer
protected java.lang.String formatMeasurements(Position pos)
protected java.lang.String getDisplayString(Position pos)
public java.lang.String getEditMode()
getEditMode
in class AbstractShapeEditor
public ExtrudedPolygon getPolygon()
protected Vec4 intersectPolygonAltitudeAt(Line ray)
ray
- Ray to intersect with the globe.public void mouseClicked(java.awt.event.MouseEvent e)
public void mouseDragged(java.awt.event.MouseEvent e)
public void mouseEntered(java.awt.event.MouseEvent e)
public void mouseExited(java.awt.event.MouseEvent e)
public void mouseMoved(java.awt.event.MouseEvent e)
public void mousePressed(java.awt.event.MouseEvent e)
public void mouseReleased(java.awt.event.MouseEvent e)
protected void moveControlPoint(ExtrudedPolygonEditor.ControlPointMarker controlPoint, java.awt.Point lastMousePoint, java.awt.Point moveToPoint)
protected void movePolygon(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void removeVertex(ExtrudedPolygonEditor.ControlPointMarker vertexToRemove)
vertexToRemove
- the vertex to remove.public void setEditMode(java.lang.String editMode)
setEditMode
in class AbstractShapeEditor
public void setPolygon(ExtrudedPolygon polygon)
protected void setPolygonHeight(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
public void setShape(AbstractShape shape)
setShape
in class AbstractShapeEditor
public void updateAnnotation(Position pos)
updateAnnotation
in class AbstractShapeEditor