NASA World Wind

gov.nasa.worldwind.layers
Interface Layer

All Superinterfaces:
AVList, Disposable, EventListener, PropertyChangeListener, Restorable, WWObject
All Known Subinterfaces:
AirspaceEditor
All Known Implementing Classes:
AbstractAirspaceEditor, AbstractGraticuleLayer, AbstractLayer, AirspaceLayer, AnnotationLayer, BasicTiledImageLayer, BMNGOneImage, BMNGWMSLayer, Clementine30Layer, Clementine40BaseLayer, Clementine40Layer, CompassLayer, CountryBoundariesLayer, CrosshairLayer, EarthNASAPlaceNameLayer, GliderImageLayer, HawaiianIslandsLayer, IconLayer, LandsatI3WMSLayer, LatLonGraticuleLayer, LayerManagerLayer, MarkerLayer, MDIMLayer, MeasureTool.CustomRenderableLayer, MGRSGraticuleLayer, MOCColorizedBaseLayer, MOCColorizedLayer, MOCLayer, MolaColorASULayer, MolaColoredJPLLayer, MSVirtualEarthLayer, NAIPCaliforniaWMS, NASAWFSPlaceNameLayer, OpenStreetMapLayer, PlaceNameLayer, PolygonEditor, RenderableLayer, RPFTiledImageLayer, ScalebarLayer, SegmentPlaneEditor, ShadedElevationLayer, SkyColorLayer, SkyGradientLayer, SphereAirspaceEditor, StarsLayer, StatusLayer, StatusLayer.StatusMGRSLayer, StatusLayer.StatusUTMLayer, SurfaceImageLayer, SurfaceShapeLayer, TerrainProfileLayer, THEMISColorLayer, THEMISLayer, TiledImageLayer, TrackLayer, USGSDigitalOrtho, USGSTopographicMaps, USGSTopoHighRes, USGSTopoLowRes, USGSTopoMedRes, USGSUrbanAreaOrtho, UTMGraticuleLayer, ViewControlsLayer, WMSTiledImageLayer, WorldMapLayer

public interface Layer
extends WWObject, Disposable, Restorable


Method Summary
 long getExpiryTime()
          Returns the current expiry time.
 String getName()
          Returns the layer's name, as specified in the most recent call to setName(java.lang.String).
 double getOpacity()
          Returns the layer's opacity, the degree to which it is blended with underlying layers.
 double getScale()
          Returns the map scale, in terms of the ratio of 1 to the value returned, e.g., 1:24000.
 boolean isAtMaxResolution()
          Indicates whether the most recent rendering of the layer rendered the highest resolution imagery or other data available.
 boolean isEnabled()
          Indicates whether the layer is enabled for rendering and selection.
 boolean isMultiResolution()
          Indicates whether the layer provides multiple resolutions of imagery or other data.
 boolean isNetworkRetrievalEnabled()
          Indicates whether the layer is allowed to retrieve data from the network.
 boolean isPickEnabled()
          Indicates whether the layer performs selection during picking.
 void pick(DrawContext dc, Point pickPoint)
          Cause the layer to perform picking, which determines whether the object or its components intersect a given point on the screen.
 void preRender(DrawContext dc)
           
 void render(DrawContext dc)
          Cause the layer to draw its representation.
 void setEnabled(boolean enabled)
          Controls whether the layer is enabled for rendering and selection.
 void setExpiryTime(long expiryTime)
          Specifies the time of the layer's most recent dataset update.
 void setName(String name)
          Set the layer's name.
 void setNetworkRetrievalEnabled(boolean networkRetrievalEnabled)
          Controls whether the layer is allowed to retrieve data from the network.
 void setOpacity(double opacity)
          Sets the layer's opacity, the degree to which it is blended with underlying layers.
 void setPickEnabled(boolean isPickable)
          Controls whether the layer should perform picking.
 
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 
Methods inherited from interface gov.nasa.worldwind.Disposable
dispose
 
Methods inherited from interface gov.nasa.worldwind.Restorable
getRestorableState, restoreState
 

Method Detail

getExpiryTime

long getExpiryTime()
Returns the current expiry time.

Returns:
the current expiry time.

getName

String getName()
Returns the layer's name, as specified in the most recent call to setName(java.lang.String).

Returns:
the layer's name.

getOpacity

double getOpacity()
Returns the layer's opacity, the degree to which it is blended with underlying layers.

Many layers apply special usage of opacity, and some ignore it in favor of the opacity settings of their internal renderables. See the description of this method in specific layers to determine usage there.

Returns:
The layer's opacity, a value between 0 and 1.

getScale

double getScale()
Returns the map scale, in terms of the ratio of 1 to the value returned, e.g., 1:24000.

Returns:
the map scale.

isAtMaxResolution

boolean isAtMaxResolution()
Indicates whether the most recent rendering of the layer rendered the highest resolution imagery or other data available. Some layers do not track resolution. For those layers this value will always be true. Typically such layers also return false from isMultiResolution().

Returns:
true if the layer is at maximum resolution, otherwise false.

isEnabled

boolean isEnabled()
Indicates whether the layer is enabled for rendering and selection.

Returns:
true if the layer is enabled, else false.

isMultiResolution

boolean isMultiResolution()
Indicates whether the layer provides multiple resolutions of imagery or other data.

Returns:
true if the layer provides multiple resolutions, else false.

isNetworkRetrievalEnabled

boolean isNetworkRetrievalEnabled()
Indicates whether the layer is allowed to retrieve data from the network. Many layers have no need to retrieve data from the network. This state is meaningless for such layers.

Returns:
true if the layer is enabled to retrieve network data, else false.

isPickEnabled

boolean isPickEnabled()
Indicates whether the layer performs selection during picking.

Returns:
true if picking is enabled, else false.

pick

void pick(DrawContext dc,
          Point pickPoint)
Cause the layer to perform picking, which determines whether the object or its components intersect a given point on the screen. Objects that intersect that point are added to the draw context's pick list and are conveyed to the application via selection events or by a direct query of WorldWindow.getObjectsAtCurrentPosition().

Parameters:
dc - the current draw context for rendering.
pickPoint - the screen coordinate point
See Also:
SelectEvent

preRender

void preRender(DrawContext dc)

render

void render(DrawContext dc)
Cause the layer to draw its representation.

Parameters:
dc - the current draw context for rendering.

setEnabled

void setEnabled(boolean enabled)
Controls whether the layer is enabled for rendering and selection.

Parameters:
enabled - true if the layer is enabled, else false.

setExpiryTime

void setExpiryTime(long expiryTime)
Specifies the time of the layer's most recent dataset update. If greater than zero, the layer ignores and eliminates any previously cached data older than the time specfied, and requests new information from the data source. If zero, the layer uses any expiry times intrinsic to the layer, typically initialized at layer construction. The default expiry time is 0, thereby enabling a layer's intrinsic expiration criteria.

Parameters:
expiryTime - the expiry time of any cached data, expressed as a number of milliseconds beyond the epoch.
See Also:
for a description of milliseconds beyond the epoch.

setName

void setName(String name)
Set the layer's name. The name is a convenience attribute typically used to identify the layer in user interfaces. By default, a layer has no name.

Parameters:
name - the name to assign to the layer.

setNetworkRetrievalEnabled

void setNetworkRetrievalEnabled(boolean networkRetrievalEnabled)
Controls whether the layer is allowed to retrieve data from the network. Many layers have no need for data from the network. This state may be set but is meaningless for such layers.

Parameters:
networkRetrievalEnabled - true if network retrieval is allowed, else false.

setOpacity

void setOpacity(double opacity)
Sets the layer's opacity, the degree to which it is blended with underlying layers.

Many layers apply special usage of opacity, and some ignore it in favor of the opacity settings of their internal renderables. See the description of this method in specific layers to determine usage there.

Parameters:
opacity - The layer opacity, a value between 0 and 1. 0 indicates non-opaque (fully transparent), 1 indicates fully opaque. Values between 0 and 1 indicate partial opacity.

setPickEnabled

void setPickEnabled(boolean isPickable)
Controls whether the layer should perform picking.

Parameters:
isPickable - true if the layer should perform picking, else false.

NASA World Wind