Class BasicAirspaceAttributes
- java.lang.Object
-
- gov.nasa.worldwind.render.BasicShapeAttributes
-
- gov.nasa.worldwind.render.airspaces.BasicAirspaceAttributes
-
- All Implemented Interfaces:
Exportable,AirspaceAttributes,ShapeAttributes
public class BasicAirspaceAttributes extends BasicShapeAttributes implements AirspaceAttributes
Basic implementation of theAirspaceAttributesinterface. AirspaceAttributes was originally designed as a special purpose attribute bundle forAirspaceshapes, but is now redundant subclass ofBasicShapeAttributes. BasicAirspaceAttributes is still supported to ensure backward compatibility with earlier versions of WorldWind. Usage of methods unique to AirspaceAttributes should be replaced with the equivalent methods in ShapeAttributes.
-
-
Field Summary
-
Fields inherited from class gov.nasa.worldwind.render.BasicShapeAttributes
drawInterior, drawOutline, enableAntialiasing, enableLighting, imageScale, imageSource, interiorMaterial, interiorOpacity, outlineMaterial, outlineOpacity, outlineStippleFactor, outlineStipplePattern, outlineWidth, unresolved
-
Fields inherited from interface gov.nasa.worldwind.Exportable
FORMAT_NOT_SUPPORTED, FORMAT_PARTIALLY_SUPPORTED, FORMAT_SUPPORTED
-
-
Constructor Summary
Constructors Constructor Description BasicAirspaceAttributes()Creates a new BasicAirspaceAttributes with the default attributes.BasicAirspaceAttributes(AirspaceAttributes attributes)Creates a newBasicAirspaceAttributesconfigured with the specifiedattributes.BasicAirspaceAttributes(Material material, double opacity)Creates a new BasicAirspaceAttributes with the specified interior material and interior opacity.BasicAirspaceAttributes(ShapeAttributes attributes)Creates a newBasicAirspaceAttributesconfigured with the specifiedShapeAttributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyMaterial(DrawContext dc, Material material, double opacity, boolean enableMaterial)AirspaceAttributescopy()Returns a new ShapeAttributes instance of the same type as this ShapeAttributes who's properties are configured exactly as this ShapeAttributes.voidcopy(ShapeAttributes attributes)Copies the specified ShapeAttributes' properties into this object's properties.protected voidrestoreDeprecatedState(RestorableSupport rs, RestorableSupport.StateObject so)voidrestoreState(RestorableSupport rs, RestorableSupport.StateObject so)Restores the state of any attributes contained in the specifiedRestorableSupport.-
Methods inherited from class gov.nasa.worldwind.render.BasicShapeAttributes
equals, export, exportAsKML, getImageScale, getImageSource, getInteriorMaterial, getInteriorOpacity, getOutlineMaterial, getOutlineOpacity, getOutlineStippleFactor, getOutlineStipplePattern, getOutlineWidth, getRestorableState, hashCode, isDrawInterior, isDrawOutline, isEnableAntialiasing, isEnableLighting, isExportFormatSupported, isUnresolved, setDrawInterior, setDrawOutline, setEnableAntialiasing, setEnableLighting, setImageScale, setImageSource, setInteriorMaterial, setInteriorOpacity, setOutlineMaterial, setOutlineOpacity, setOutlineStippleFactor, setOutlineStipplePattern, setOutlineWidth, setUnresolved
-
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nasa.worldwind.Exportable
export, isExportFormatSupported
-
Methods inherited from interface gov.nasa.worldwind.render.ShapeAttributes
getImageScale, getImageSource, getInteriorMaterial, getInteriorOpacity, getOutlineMaterial, getOutlineOpacity, getOutlineStippleFactor, getOutlineStipplePattern, getOutlineWidth, getRestorableState, isDrawInterior, isDrawOutline, isEnableAntialiasing, isEnableLighting, isUnresolved, setDrawInterior, setDrawOutline, setEnableAntialiasing, setEnableLighting, setImageScale, setImageSource, setInteriorMaterial, setInteriorOpacity, setOutlineMaterial, setOutlineOpacity, setOutlineStippleFactor, setOutlineStipplePattern, setOutlineWidth, setUnresolved
-
-
-
-
Constructor Detail
-
BasicAirspaceAttributes
public BasicAirspaceAttributes()
Creates a new BasicAirspaceAttributes with the default attributes. The default attributes differ from BasicShapeAttributes, and are as follows:Default Attributes Attribute Default Value unresolved truedrawInterior truedrawOutline falseenableAntialiasing falseenableLighting trueinteriorMaterial Material.WHITEoutlineMaterial Material.BLACKinteriorOpacity 1.0 outlineOpacity 1.0 outlineWidth 1.0 outlineStippleFactor 0 outlineStipplePattern 0xF0F0 imageSource nullimageScale 1.0
-
BasicAirspaceAttributes
public BasicAirspaceAttributes(Material material, double opacity)
Creates a new BasicAirspaceAttributes with the specified interior material and interior opacity. All other attributes are set to the default values, which differ from BasicShapeAttributes, and are as follows:Default Attributes Attribute Default Value unresolved truedrawInterior truedrawOutline falseenableAntialiasing falseenableLighting trueinteriorMaterial material outlineMaterial Material.BLACKinteriorOpacity opacity outlineOpacity 1.0 outlineWidth 1.0 outlineStippleFactor 0 outlineStipplePattern 0xF0F0 imageSource nullimageScale 1.0 - Parameters:
material- Material to apply.opacity- the opacity to set.
-
BasicAirspaceAttributes
public BasicAirspaceAttributes(ShapeAttributes attributes)
Creates a newBasicAirspaceAttributesconfigured with the specifiedShapeAttributes.- Parameters:
attributes- the attributes to configure the newBasicAirspaceAttributeswith.- Throws:
java.lang.IllegalArgumentException- ifattributesisnull.
-
BasicAirspaceAttributes
public BasicAirspaceAttributes(AirspaceAttributes attributes)
Creates a newBasicAirspaceAttributesconfigured with the specifiedattributes.- Parameters:
attributes- the attributes to configure the newBasicAirspaceAttributeswith.- Throws:
java.lang.IllegalArgumentException- ifattributesisnull.
-
-
Method Detail
-
copy
public AirspaceAttributes copy()
Returns a new ShapeAttributes instance of the same type as this ShapeAttributes who's properties are configured exactly as this ShapeAttributes.- Specified by:
copyin interfaceShapeAttributes- Overrides:
copyin classBasicShapeAttributes- Returns:
- a copy of this ShapeAttributes.
-
copy
public void copy(ShapeAttributes attributes)
Copies the specified ShapeAttributes' properties into this object's properties. This does nothing if the specified attributes isnull.- Specified by:
copyin interfaceShapeAttributes- Overrides:
copyin classBasicShapeAttributes- Parameters:
attributes- the attributes to copy.
-
restoreState
public void restoreState(RestorableSupport rs, RestorableSupport.StateObject so)
Restores the state of any attributes contained in the specifiedRestorableSupport. If theStateObjectis notnullit's searched for attribute state values, otherwise theRestorableSupportroot is searched.- Specified by:
restoreStatein interfaceShapeAttributes- Overrides:
restoreStatein classBasicShapeAttributes- Parameters:
rs- theRestorableSupportthat contains the attributes' state.so- theStateObjectto search for state values, if notnull.
-
restoreDeprecatedState
protected void restoreDeprecatedState(RestorableSupport rs, RestorableSupport.StateObject so)
-
applyMaterial
protected void applyMaterial(DrawContext dc, Material material, double opacity, boolean enableMaterial)
-
-