Class AirspaceBuilder
- java.lang.Object
-
- gov.nasa.worldwindx.examples.ApplicationTemplate
-
- gov.nasa.worldwindx.examples.AirspaceBuilder
-
public class AirspaceBuilder extends ApplicationTemplate
Illustrates runtime construction of 3D extruded polygons and spheres using WorldWindshapes. This uses aAirspaceand aPolygonEditorto enable runtime editing ofSphereAirspaceEditorairspace andPolygonshapes.SphereAirspaceUsage Instructions
Adding and Removing Shapes
Add a shape by selecting eitherPolygonorSpherein the drop down box then clickingNew shape. Delete a shape by left-clicking it then pressing thedeletekey.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 theShiftkey 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 theAltkey and left-clicking anywhere near the polygon. Remove a polygon control point by holding theControlkey 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 theShiftkey then left-click any blue sphere at a vertex and drag it.Demo Shapes
Select
File -> Load Demo Shapesto 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAirspaceBuilder.AirspaceBuilderControllerprotected static classAirspaceBuilder.AirspaceBuilderModelprotected static classAirspaceBuilder.AirspaceBuilderPanelprotected static classAirspaceBuilder.AirspaceEntryprotected static interfaceAirspaceBuilder.AirspaceFactoryprotected static classAirspaceBuilder.AppFrameprotected static classAirspaceBuilder.PolygonAirspaceFactoryprotected static classAirspaceBuilder.SphereAirspaceFactory-
Nested classes/interfaces inherited from class gov.nasa.worldwindx.examples.ApplicationTemplate
ApplicationTemplate.AppPanel
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringAIRSPACE_LAYER_NAMEprotected static java.lang.StringCLEAR_SELECTIONprotected static doubleDEFAULT_SHAPE_SIZE_METERSprotected static AirspaceBuilder.AirspaceFactory[]defaultAirspaceFactoriesprotected static java.lang.StringDEMO_AIRSPACES_PATHprotected static java.lang.StringENABLE_EDITprotected static java.lang.StringNEW_AIRSPACEprotected static longnextEntryNumberprotected static java.lang.StringOPENprotected static java.lang.StringOPEN_DEMO_AIRSPACESprotected static java.lang.StringOPEN_URLprotected static java.lang.StringREMOVE_SELECTEDprotected static java.lang.StringSAVEprotected static java.lang.StringSELECTION_CHANGEDprotected static java.lang.StringSIZE_NEW_SHAPES_TO_VIEWPORT
-
Constructor Summary
Constructors Constructor Description AirspaceBuilder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AirspaceAttributesgetDefaultAttributes()protected static AirspaceEditorgetEditorFor(Airspace airspace)static AirspaceAttributesgetIntersectionAttributes()static java.lang.StringgetNextName(java.lang.String base)static AirspaceAttributesgetSelectionAndIntersectionAttributes()static AirspaceAttributesgetSelectionAttributes()static voidmain(java.lang.String[] args)static voidsetEditorAttributes(AirspaceEditor editor)-
Methods inherited from class gov.nasa.worldwindx.examples.ApplicationTemplate
insertAfterPlacenames, insertBeforeCompass, insertBeforeLayerName, insertBeforePlacenames, start
-
-
-
-
Field Detail
-
AIRSPACE_LAYER_NAME
protected static final java.lang.String AIRSPACE_LAYER_NAME
- See Also:
- Constant Field Values
-
CLEAR_SELECTION
protected static final java.lang.String CLEAR_SELECTION
- See Also:
- Constant Field Values
-
SIZE_NEW_SHAPES_TO_VIEWPORT
protected static final java.lang.String SIZE_NEW_SHAPES_TO_VIEWPORT
- See Also:
- Constant Field Values
-
ENABLE_EDIT
protected static final java.lang.String ENABLE_EDIT
- See Also:
- Constant Field Values
-
OPEN
protected static final java.lang.String OPEN
- See Also:
- Constant Field Values
-
OPEN_URL
protected static final java.lang.String OPEN_URL
- See Also:
- Constant Field Values
-
OPEN_DEMO_AIRSPACES
protected static final java.lang.String OPEN_DEMO_AIRSPACES
- See Also:
- Constant Field Values
-
NEW_AIRSPACE
protected static final java.lang.String NEW_AIRSPACE
- See Also:
- Constant Field Values
-
REMOVE_SELECTED
protected static final java.lang.String REMOVE_SELECTED
- See Also:
- Constant Field Values
-
SAVE
protected static final java.lang.String SAVE
- See Also:
- Constant Field Values
-
SELECTION_CHANGED
protected static final java.lang.String SELECTION_CHANGED
- See Also:
- Constant Field Values
-
DEMO_AIRSPACES_PATH
protected static final java.lang.String DEMO_AIRSPACES_PATH
- See Also:
- Constant Field Values
-
defaultAirspaceFactories
protected static AirspaceBuilder.AirspaceFactory[] defaultAirspaceFactories
-
DEFAULT_SHAPE_SIZE_METERS
protected static final double DEFAULT_SHAPE_SIZE_METERS
- See Also:
- Constant Field Values
-
nextEntryNumber
protected static long nextEntryNumber
-
-
Method Detail
-
getDefaultAttributes
public static AirspaceAttributes getDefaultAttributes()
-
getSelectionAttributes
public static AirspaceAttributes getSelectionAttributes()
-
getIntersectionAttributes
public static AirspaceAttributes getIntersectionAttributes()
-
getSelectionAndIntersectionAttributes
public static AirspaceAttributes getSelectionAndIntersectionAttributes()
-
setEditorAttributes
public static void setEditorAttributes(AirspaceEditor editor)
-
getNextName
public static java.lang.String getNextName(java.lang.String base)
-
getEditorFor
protected static AirspaceEditor getEditorFor(Airspace airspace)
-
main
public static void main(java.lang.String[] args)
-
-