public class RigidShapeEditor extends AbstractShapeEditor
Modifier and Type | Class and Description |
---|---|
protected static class |
RigidShapeEditor.ControlPointMarker |
static class |
RigidShapeEditor.Direction |
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 |
---|
RigidShapeEditor() |
Modifier and Type | Method and Description |
---|---|
protected void |
addVertex(java.awt.Point mousePoint)
Add a vertex to the polygon's outer boundary.
|
protected void |
assembleControlPointAttributes() |
protected void |
assembleControlPoints(DrawContext dc) |
protected void |
assembleRotationControlPoints(DrawContext dc) |
protected void |
assembleScaleControlPoints(DrawContext dc) |
protected void |
assembleSkewControlPoints(DrawContext dc) |
protected void |
assembleTextureControlPoints(DrawContext dc) |
protected void |
assembleTranslationControlPoints(DrawContext dc) |
protected void |
assembleVertexControlPoints(DrawContext dc) |
protected void |
changeShapeHeading(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
changeShapeRoll(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
changeShapeTilt(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
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() |
int |
getSelectedFace() |
RigidShape |
getShape() |
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(RigidShapeEditor.ControlPointMarker controlPoint,
java.awt.Point moveToPoint) |
protected void |
moveShape(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
moveShapeLatitude(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
moveShapeLongitude(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
moveTexture(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
moveTextureCorner(java.awt.Point previousMousePoint,
java.awt.Point mousePoint,
java.lang.Integer corner) |
protected void |
removeVertex(RigidShapeEditor.ControlPointMarker vertexToRemove)
Remove a vertex from the polygon.
|
protected void |
scaleShape(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
scaleShapeAngle(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
scaleShapeDown(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
scaleShapeEast(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
scaleShapeEastWest(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
scaleShapeNorth(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
scaleShapeNortheast(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
scaleShapeNorthSouth(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
scaleShapeRadius(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
scaleShapeSouth(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
scaleShapeSouthwest(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
scaleShapeUp(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
scaleShapeVertical(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
scaleShapeWest(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
scaleTexture(java.awt.Point previousMousePoint,
java.awt.Point mousePoint,
RigidShapeEditor.Direction side) |
void |
setEditMode(java.lang.String editMode) |
void |
setSelectedFace(int selectedFace) |
void |
setShape(AbstractShape shape) |
protected void |
setShapeHeight(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
skewShape(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
skewShapeEastWest(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
skewShapeNorthSouth(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
protected void |
textureShape(java.awt.Point previousMousePoint,
java.awt.Point mousePoint) |
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 RigidShape activeControlPoint
protected int activeControlPointIndex
public static final java.lang.String CHANGE_HEADING_ACTION
public static final java.lang.String CHANGE_HEIGHT_ACTION
public static final java.lang.String CHANGE_LATITUDE_ACTION
public static final java.lang.String CHANGE_LONGITUDE_ACTION
public static final java.lang.String CHANGE_ROLL_ACTION
public static final java.lang.String CHANGE_SKEW_ACTION
public static final java.lang.String CHANGE_TILT_ACTION
protected java.util.List<RigidShape> controlPoints
protected boolean firstPass
protected ShapeAttributes headingGuideAttributes
protected ShapeAttributes heightControlAttributes
protected java.lang.Thread intersectionsDispatchThread
public static final java.lang.Integer LOWER_LEFT_UV
public static final java.lang.Integer LOWER_RIGHT_UV
public static final java.lang.String MOVE_SHAPE_ACTION
public static final java.lang.String MOVE_VERTEX_ACTION
protected ShapeAttributes radiusControlAttributes
protected ShapeAttributes radiusRodAttributes
protected ShapeAttributes rollGuideAttributes
public static final java.lang.String ROTATION_MODE
protected ShapeAttributes rotationControlAttributes
protected ShapeAttributes rotationRodAttributes
public static final java.lang.String SCALE_ANGLE_ACTION
public static final java.lang.String SCALE_DOWN_ACTION
public static final java.lang.String SCALE_EAST_ACTION
public static final java.lang.String SCALE_EAST_WEST_ACTION
public static final java.lang.String SCALE_MODE
public static final java.lang.String SCALE_NORTH_ACTION
public static final java.lang.String SCALE_NORTH_SOUTH_ACTION
public static final java.lang.String SCALE_NORTHEAST_ACTION
public static final java.lang.String SCALE_NORTHWEST_ACTION
public static final java.lang.String SCALE_RADIUS_ACTION
public static final java.lang.String SCALE_SHAPE_ACTION
public static final java.lang.String SCALE_SOUTH_ACTION
public static final java.lang.String SCALE_SOUTHEAST_ACTION
public static final java.lang.String SCALE_SOUTHWEST_ACTION
public static final java.lang.String SCALE_UP_ACTION
public static final java.lang.String SCALE_VERTICAL_ACTION
public static final java.lang.String SCALE_WEST_ACTION
protected ShapeAttributes scaleControlAttributes
protected ShapeAttributes scaleRodAttributes
protected int selectedFace
public static final java.lang.String SET_TEXTURE_ACTION
protected RigidShape shape
public static final java.lang.String SKEW_EAST_WEST_ACTION
public static final java.lang.String SKEW_MODE
public static final java.lang.String SKEW_NORTH_SOUTH_ACTION
protected Path tempPath
protected Path tempPath2
protected Path tempPath3
public static final java.lang.String TEXTURE_LOWER_LEFT_ACTION
public static final java.lang.String TEXTURE_LOWER_RIGHT_ACTION
public static final java.lang.String TEXTURE_MODE
public static final java.lang.String TEXTURE_MOVE_ACTION
public static final java.lang.String TEXTURE_SCALE_DOWN_ACTION
public static final java.lang.String TEXTURE_SCALE_LEFT_ACTION
public static final java.lang.String TEXTURE_SCALE_RIGHT_ACTION
public static final java.lang.String TEXTURE_SCALE_UP_ACTION
public static final java.lang.String TEXTURE_UPPER_LEFT_ACTION
public static final java.lang.String TEXTURE_UPPER_RIGHT_ACTION
protected ShapeAttributes textureControlAttributes
protected ShapeAttributes tiltGuideAttributes
public static final java.lang.String TRANSLATION_MODE
protected ShapeAttributes translationControlAttributes
protected ShapeAttributes translationRodAttributes
public static final java.lang.Integer UPPER_LEFT_UV
public static final java.lang.Integer UPPER_RIGHT_UV
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 assembleControlPointAttributes()
protected void assembleControlPoints(DrawContext dc)
protected void assembleRotationControlPoints(DrawContext dc)
protected void assembleScaleControlPoints(DrawContext dc)
protected void assembleSkewControlPoints(DrawContext dc)
protected void assembleTextureControlPoints(DrawContext dc)
protected void assembleTranslationControlPoints(DrawContext dc)
protected void assembleVertexControlPoints(DrawContext dc)
protected void changeShapeHeading(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void changeShapeRoll(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void changeShapeTilt(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
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 int getSelectedFace()
public RigidShape getShape()
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(RigidShapeEditor.ControlPointMarker controlPoint, java.awt.Point moveToPoint)
protected void moveShape(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void moveShapeLatitude(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void moveShapeLongitude(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void moveTexture(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void moveTextureCorner(java.awt.Point previousMousePoint, java.awt.Point mousePoint, java.lang.Integer corner)
protected void removeVertex(RigidShapeEditor.ControlPointMarker vertexToRemove)
vertexToRemove
- the vertex to remove.protected void scaleShape(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void scaleShapeAngle(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void scaleShapeDown(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void scaleShapeEast(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void scaleShapeEastWest(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void scaleShapeNorth(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void scaleShapeNortheast(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void scaleShapeNorthSouth(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void scaleShapeRadius(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void scaleShapeSouth(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void scaleShapeSouthwest(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void scaleShapeUp(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void scaleShapeVertical(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void scaleShapeWest(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void scaleTexture(java.awt.Point previousMousePoint, java.awt.Point mousePoint, RigidShapeEditor.Direction side)
public void setEditMode(java.lang.String editMode)
setEditMode
in class AbstractShapeEditor
public void setSelectedFace(int selectedFace)
public void setShape(AbstractShape shape)
setShape
in class AbstractShapeEditor
protected void setShapeHeight(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void skewShape(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void skewShapeEastWest(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void skewShapeNorthSouth(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
protected void textureShape(java.awt.Point previousMousePoint, java.awt.Point mousePoint)
public void updateAnnotation(Position pos)
updateAnnotation
in class AbstractShapeEditor