public class AirspaceBuilder extends ApplicationTemplate
Airspace
shapes. This uses a PolygonEditor
and a SphereAirspaceEditor
to enable
runtime editing of Polygon
airspace and SphereAirspace
shapes.
Adding and Removing Shapes
Add a shape by selecting either Polygon
or Sphere
in the drop down box then clicking
New shape
. Delete a shape by left-clicking it then pressing the delete
key.
Moving Shapes
Move a shape by left-clicking and dragging it.
Editing Spheres
Note: a sphere must be selected before it can be edited. Select a sphere by left-clicking it.
Adjust a sphere's height by holding the Shift
key then left-click and drag the sphere. Resize a sphere
by moving the cursor toward the sphere's edge until a blue control point appears, then left-click and drag the
control point.
Editing Polygons
Note: a polygon must be selected before it can be edited. Select a polygon by left-clicking it.
Add a polygon vertex by holding the Alt
key and left-clicking anywhere near the polygon. Remove a
polygon control point by holding the Control
key and left-clicking the blue sphere at the vertex. Move a
polygon vertex by left-clicking and dragging it. Change a polygon's bottom or top height by holding the
Shift
key then left-click any blue sphere at a vertex and drag it.
Select File -> Load Demo Shapes
to display a set of polygon airspace shapes built with this editor. The
data for these shapes is located in the WorldWind project under
src/gov/nasa/worldwindx/examples/data/AirspaceBuilder-DemoShapes.zip.
Modifier and Type | Class and Description |
---|---|
protected static class |
AirspaceBuilder.AirspaceBuilderController |
protected static class |
AirspaceBuilder.AirspaceBuilderModel |
protected static class |
AirspaceBuilder.AirspaceBuilderPanel |
protected static class |
AirspaceBuilder.AirspaceEntry |
protected static interface |
AirspaceBuilder.AirspaceFactory |
protected static class |
AirspaceBuilder.AppFrame |
protected static class |
AirspaceBuilder.PolygonAirspaceFactory |
protected static class |
AirspaceBuilder.SphereAirspaceFactory |
ApplicationTemplate.AppPanel
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
AIRSPACE_LAYER_NAME |
protected static java.lang.String |
CLEAR_SELECTION |
protected static double |
DEFAULT_SHAPE_SIZE_METERS |
protected static AirspaceBuilder.AirspaceFactory[] |
defaultAirspaceFactories |
protected static java.lang.String |
DEMO_AIRSPACES_PATH |
protected static java.lang.String |
ENABLE_EDIT |
protected static java.lang.String |
NEW_AIRSPACE |
protected static long |
nextEntryNumber |
protected static java.lang.String |
OPEN |
protected static java.lang.String |
OPEN_DEMO_AIRSPACES |
protected static java.lang.String |
OPEN_URL |
protected static java.lang.String |
REMOVE_SELECTED |
protected static java.lang.String |
SAVE |
protected static java.lang.String |
SELECTION_CHANGED |
protected static java.lang.String |
SIZE_NEW_SHAPES_TO_VIEWPORT |
Constructor and Description |
---|
AirspaceBuilder() |
Modifier and Type | Method and Description |
---|---|
static AirspaceAttributes |
getDefaultAttributes() |
protected static AirspaceEditor |
getEditorFor(Airspace airspace) |
static AirspaceAttributes |
getIntersectionAttributes() |
static java.lang.String |
getNextName(java.lang.String base) |
static AirspaceAttributes |
getSelectionAndIntersectionAttributes() |
static AirspaceAttributes |
getSelectionAttributes() |
static void |
main(java.lang.String[] args) |
static void |
setEditorAttributes(AirspaceEditor editor) |
insertAfterPlacenames, insertBeforeCompass, insertBeforeLayerName, insertBeforePlacenames, start
protected static final java.lang.String AIRSPACE_LAYER_NAME
protected static final java.lang.String CLEAR_SELECTION
protected static final double DEFAULT_SHAPE_SIZE_METERS
protected static AirspaceBuilder.AirspaceFactory[] defaultAirspaceFactories
protected static final java.lang.String DEMO_AIRSPACES_PATH
protected static final java.lang.String ENABLE_EDIT
protected static final java.lang.String NEW_AIRSPACE
protected static long nextEntryNumber
protected static final java.lang.String OPEN
protected static final java.lang.String OPEN_DEMO_AIRSPACES
protected static final java.lang.String OPEN_URL
protected static final java.lang.String REMOVE_SELECTED
protected static final java.lang.String SAVE
protected static final java.lang.String SELECTION_CHANGED
protected static final java.lang.String SIZE_NEW_SHAPES_TO_VIEWPORT
public static AirspaceAttributes getDefaultAttributes()
protected static AirspaceEditor getEditorFor(Airspace airspace)
public static AirspaceAttributes getIntersectionAttributes()
public static java.lang.String getNextName(java.lang.String base)
public static AirspaceAttributes getSelectionAndIntersectionAttributes()
public static AirspaceAttributes getSelectionAttributes()
public static void main(java.lang.String[] args)
public static void setEditorAttributes(AirspaceEditor editor)