Class ShapeEditingExtension.ShapeEditorExtension

  • All Implemented Interfaces:
    SelectListener, java.beans.PropertyChangeListener, java.util.EventListener
    Enclosing class:
    ShapeEditingExtension

    public static class ShapeEditingExtension.ShapeEditorExtension
    extends ShapeEditor
    Defines an extension to ShapeEditor that knows how to operate on the custom shape defined above.
    • Method Detail

      • getShapeAltitudeMode

        protected int getShapeAltitudeMode()
        Description copied from class: ShapeEditor
        Indicates the current shape's altitude mode if the shape has one.
        Overrides:
        getShapeAltitudeMode in class ShapeEditor
        Returns:
        the shape's altitude mode if it has one, otherwise WorldWind.ABSOLUTE.
      • doMakeShadowShape

        protected Renderable doMakeShadowShape()
        Creates the shape that's shown in the original position while the original shape is edited.
        Overrides:
        doMakeShadowShape in class ShapeEditor
        Returns:
        a copy of the original shape.
      • doReshapeShape

        protected void doReshapeShape​(ShapeEditor.ControlPointMarker controlPoint,
                                      Position terrainPosition)
        Called during editing when a control point is moved. (Not when the whole object is moved.)
        Overrides:
        doReshapeShape in class ShapeEditor
        Parameters:
        controlPoint - the control point selected.
        terrainPosition - the terrain position under the cursor.
      • updateControlPoints

        protected void updateControlPoints()
        Called during editing and moving to reposition the control points. This method should only compute and set the new control point and other affordances. It should not attempt to edit the shape.
        Overrides:
        updateControlPoints in class ShapeEditor
      • reshapeArrow

        protected void reshapeArrow​(ShapeEditor.ControlPointMarker controlPoint,
                                    Position terrainPosition)
        Edit the arrow according to the control point that is being moved. In the case of the custom shape, there is only one control point, and that's for rotation.
        Parameters:
        controlPoint - the control point being moved by the user.
        terrainPosition - the terrain position under the cursor.
      • updateArrowControlPoints

        protected void updateArrowControlPoints()
        Modify the control points to conform to the current state of the shape being edited.