public abstract class AbstractLayer extends WWObjectImpl implements Layer
| Constructor and Description | 
|---|
| AbstractLayer() | 
| Modifier and Type | Method and Description | 
|---|---|
| static Element | createLayerConfigElements(AVList params,
                         Element context)Appends layer configuration parameters as elements to the specified context. | 
| void | dispose()Disposes of any internal resources allocated by the object. | 
| protected void | doPick(DrawContext dc,
      Point point) | 
| protected void | doPreRender(DrawContext dc) | 
| protected abstract void | doRender(DrawContext dc) | 
| FileStore | getDataFileStore() | 
| long | getExpiryTime()Returns the current expiry time. | 
| static AVList | getLayerConfigParams(Element domElement,
                    AVList params)Parses layer configuration parameters from the specified DOM document. | 
| double | getMaxActiveAltitude()Returns the maximum altitude at which to display the layer. | 
| Double | getMaxEffectiveAltitude(Double radius)Indicates the altitude above which this layer likely has low value or is not expected to be active. | 
| double | getMinActiveAltitude()Returns the minimum altitude at which the layer is displayed. | 
| Double | getMinEffectiveAltitude(Double radius)Indicates the altitude below which this layer likely has low value or is not expected to be active. | 
| String | getName()Returns the layer's name, as specified in the most recent call to  Layer.setName(java.lang.String). | 
| double | getOpacity()Returns the layer's opacity, the degree to which it is blended with underlying layers. | 
| String | getRestorableState()Returns an XML document string describing the object's state. | 
| double | getScale()Returns the map scale, in terms of the ratio of 1 to the value returned, e.g., 1:24000. | 
| protected ScreenCredit | getScreenCredit() | 
| 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 | isLayerActive(DrawContext dc)Indicates whether the layer is active based on arbitrary criteria. | 
| static boolean | isLayerConfigDocument(Element domElement)Returns true if a specified DOM document is a Layer configuration document, and false otherwise. | 
| boolean | isLayerInView(DrawContext dc)Indicates whether the layer is in the view. | 
| 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 point)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)Causes the layer to perform any actions necessary to subsequently render the layer. | 
| void | render(DrawContext dc)Cause the layer to draw its representation. | 
| void | restoreState(String stateInXml)Restores the object's state to what is described in the specified XML document string. | 
| void | setDataFileStore(FileStore fileStore) | 
| 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 | setMaxActiveAltitude(double maxActiveAltitude)Specifies the maximum altitude at which to display the layer. | 
| void | setMinActiveAltitude(double minActiveAltitude)Specifies the minimum altitude at which to display the layer. | 
| void | setName(String name)Set the layer's name. | 
| void | setNetworkRetrievalEnabled(boolean networkDownloadEnabled)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 pickable)Controls whether the layer should perform picking. | 
| protected void | setScreenCredit(ScreenCredit screenCredit) | 
| String | toString() | 
onMessage, propertyChangeaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuespropertyChangeonMessagepublic static Element createLayerConfigElements(AVList params, Element context)
| Parameter | Element Path | Type | 
|---|---|---|
| AVKey.DISPLAY_NAME | DisplayName | String | 
| AVKey.OPACITY | Opacity | Double | 
| AVKey.MAX_ACTIVE_ALTITUDE | ActiveAltitudes/@max | Double | 
| AVKey.MIN_ACTIVE_ALTITUDE | ActiveAltitudes/@min | Double | 
| AVKey.NETWORK_RETRIEVAL_ENABLED | NetworkRetrievalEnabled | Boolean | 
| AVKey.MAP_SCALE | MapScale | Double | 
| AVKey.SCREEN_CREDIT | ScreenCredit | ScreenCredit | 
params - the key-value pairs which define the layer configuration parameters.context - the XML document root on which to append layer configuration elements.IllegalArgumentException - if either the parameters or the context are null.public void dispose()
Disposabledispose in interface Disposableprotected void doPick(DrawContext dc, Point point)
protected void doPreRender(DrawContext dc)
protected abstract void doRender(DrawContext dc)
public FileStore getDataFileStore()
public long getExpiryTime()
LayergetExpiryTime in interface Layerpublic static AVList getLayerConfigParams(Element domElement, AVList params)
| Parameter | Element Path | Type | 
|---|---|---|
| AVKey.DISPLAY_NAME | DisplayName | String | 
| AVKey.OPACITY | Opacity | Double | 
| AVKey.MAX_ACTIVE_ALTITUDE | ActiveAltitudes/@max | Double | 
| AVKey.MIN_ACTIVE_ALTITUDE | ActiveAltitudes/@min | Double | 
| AVKey.NETWORK_RETRIEVAL_ENABLED | NetworkRetrievalEnabled | Boolean | 
| AVKey.MAP_SCALE | MapScale | Double | 
| AVKey.SCREEN_CREDIT | ScreenCredit | ScreenCredit | 
domElement - the XML document root to parse for layer configuration elements.params - the output key-value pairs which recieve the layer configuration parameters. A null reference
                   is permitted.IllegalArgumentException - if the document is null.public double getMaxActiveAltitude()
LayergetMaxActiveAltitude in interface Layerpublic Double getMaxEffectiveAltitude(Double radius)
LayerLayer.setMaxActiveAltitude(double) and does not reflect it.
 
 The returned altitude is valid when the field of view indicated by View.getFieldOfView()
 is set to its default value. Changing the field of view to any value other than the default may change this
 layer's maximum effective altitude, but the returned altitude will not reflect that change.getMaxEffectiveAltitude in interface Layerradius - the radius of the Globe the layer is associated with. May be
               null, in which case the Earth's equatorial radius is used, Earth.WGS84_EQUATORIAL_RADIUS.public double getMinActiveAltitude()
LayergetMinActiveAltitude in interface Layerpublic Double getMinEffectiveAltitude(Double radius)
LayerLayer.setMinActiveAltitude(double) and does not reflect it.
 
 The returned altitude is valid when the field of view indicated by View.getFieldOfView()
 is set to its default value. Changing the field of view to any value other than the default may change this
 layer's minimum effective altitude, but the returned altitude will not reflect that change.getMinEffectiveAltitude in interface Layerradius - the radius of the Globe the layer is associated with. May be
               null, in which case the Earth's equatorial radius is used, Earth.WGS84_EQUATORIAL_RADIUS.public String getName()
LayerLayer.setName(java.lang.String).public double getOpacity()
LayergetOpacity in interface Layerpublic String getRestorableState()
RestorablerestoreState and passing the XML document.getRestorableState in interface Restorablepublic double getScale()
Layerprotected ScreenCredit getScreenCredit()
public boolean isAtMaxResolution()
Layertrue.
 Typically such layers also return false from Layer.isMultiResolution().isAtMaxResolution in interface Layertrue if the layer is at maximum resolution, otherwise false.public boolean isEnabled()
Layerpublic boolean isLayerActive(DrawContext dc)
LayerisLayerActive in interface Layerdc - the current draw contexttrue if the layer is active, false otherwise.public static boolean isLayerConfigDocument(Element domElement)
domElement - the DOM document in question.IllegalArgumentException - if document is null.public boolean isLayerInView(DrawContext dc)
LayerisLayerInView in interface Layerdc - the current draw contexttrue if the layer is in the view, false otherwise.public boolean isMultiResolution()
LayerisMultiResolution in interface Layertrue if the layer provides multiple resolutions, else false.public boolean isNetworkRetrievalEnabled()
LayerisNetworkRetrievalEnabled in interface Layertrue if the layer is enabled to retrieve network data, else false.public boolean isPickEnabled()
LayerSurfaceImage and SurfaceImageLayer} when the image
 covers a large area because the view input handlers detect the surface image rather than the terrain as the top
 picked object, and will not respond to the user's attempts at navigation. The solution is to disable picking for
 the layer.isPickEnabled in interface Layertrue if picking is enabled, else false.public void pick(DrawContext dc, Point point)
LayerWorldWindow.getObjectsAtCurrentPosition().pick in interface Layerdc - the current draw context for rendering.point - the screen coordinate pointSelectEventpublic void preRender(DrawContext dc)
Layerpublic void render(DrawContext dc)
Layerrender in interface Layerdc - the current draw contextIllegalArgumentException - if dc is null, or dc's Globe or
                                  View is nullpublic void restoreState(String stateInXml)
RestorablerestoreState in interface RestorablestateInXml - an XML document string describing an object's state.public void setDataFileStore(FileStore fileStore)
public void setEnabled(boolean enabled)
LayersetEnabled in interface Layerenabled - true if the layer is enabled, else false.public void setExpiryTime(long expiryTime)
LayersetExpiryTime in interface LayerexpiryTime - the expiry time of any cached data, expressed as a number of milliseconds beyond the epoch.for a description of milliseconds beyond the epoch.public void setMaxActiveAltitude(double maxActiveAltitude)
LayersetMaxActiveAltitude in interface LayermaxActiveAltitude - the maximum altitude at which to display the layer.public void setMinActiveAltitude(double minActiveAltitude)
LayersetMinActiveAltitude in interface LayerminActiveAltitude - the minimum altitude at which to display the layer.public void setName(String name)
Layerpublic void setNetworkRetrievalEnabled(boolean networkDownloadEnabled)
LayersetNetworkRetrievalEnabled in interface LayernetworkDownloadEnabled - true if network retrieval is allowed, else false.public void setOpacity(double opacity)
LayersetOpacity in interface Layeropacity - 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.public void setPickEnabled(boolean pickable)
LayersetPickEnabled in interface Layerpickable - true if the layer should perform picking, else false.protected void setScreenCredit(ScreenCredit screenCredit)