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 theAirspaceAttributes
interface. AirspaceAttributes was originally designed as a special purpose attribute bundle forAirspace
shapes, 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 newBasicAirspaceAttributes
configured 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 newBasicAirspaceAttributes
configured with the specifiedShapeAttributes
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyMaterial(DrawContext dc, Material material, double opacity, boolean enableMaterial)
AirspaceAttributes
copy()
Returns a new ShapeAttributes instance of the same type as this ShapeAttributes who's properties are configured exactly as this ShapeAttributes.void
copy(ShapeAttributes attributes)
Copies the specified ShapeAttributes' properties into this object's properties.protected void
restoreDeprecatedState(RestorableSupport rs, RestorableSupport.StateObject so)
void
restoreState(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 true
drawInterior true
drawOutline false
enableAntialiasing false
enableLighting true
interiorMaterial Material.WHITE
outlineMaterial Material.BLACK
interiorOpacity 1.0 outlineOpacity 1.0 outlineWidth 1.0 outlineStippleFactor 0 outlineStipplePattern 0xF0F0 imageSource null
imageScale 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 true
drawInterior true
drawOutline false
enableAntialiasing false
enableLighting true
interiorMaterial material outlineMaterial Material.BLACK
interiorOpacity opacity outlineOpacity 1.0 outlineWidth 1.0 outlineStippleFactor 0 outlineStipplePattern 0xF0F0 imageSource null
imageScale 1.0 - Parameters:
material
- Material to apply.opacity
- the opacity to set.
-
BasicAirspaceAttributes
public BasicAirspaceAttributes(ShapeAttributes attributes)
Creates a newBasicAirspaceAttributes
configured with the specifiedShapeAttributes
.- Parameters:
attributes
- the attributes to configure the newBasicAirspaceAttributes
with.- Throws:
java.lang.IllegalArgumentException
- ifattributes
isnull
.
-
BasicAirspaceAttributes
public BasicAirspaceAttributes(AirspaceAttributes attributes)
Creates a newBasicAirspaceAttributes
configured with the specifiedattributes
.- Parameters:
attributes
- the attributes to configure the newBasicAirspaceAttributes
with.- Throws:
java.lang.IllegalArgumentException
- ifattributes
isnull
.
-
-
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:
copy
in interfaceShapeAttributes
- Overrides:
copy
in 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:
copy
in interfaceShapeAttributes
- Overrides:
copy
in 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 theStateObject
is notnull
it's searched for attribute state values, otherwise theRestorableSupport
root is searched.- Specified by:
restoreState
in interfaceShapeAttributes
- Overrides:
restoreState
in classBasicShapeAttributes
- Parameters:
rs
- theRestorableSupport
that contains the attributes' state.so
- theStateObject
to 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)
-
-