|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.layers.AbstractLayer
public abstract class AbstractLayer
Field Summary | |
---|---|
protected ScreenCredit |
screenCredit
|
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl |
---|
changeSupport |
Constructor Summary | |
---|---|
AbstractLayer()
|
Method Summary | |
---|---|
void |
dispose()
|
protected void |
doPick(DrawContext dc,
Point point)
|
protected void |
doPreRender(DrawContext dc)
|
protected abstract void |
doRender(DrawContext dc)
|
long |
getExpiryTime()
Returns the current expiry time. |
double |
getMaxActiveAltitude()
|
double |
getMinActiveAltitude()
|
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. |
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)
|
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 |
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)
|
void |
setMinActiveAltitude(double minActiveAltitude)
|
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()
|
Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
---|
propertyChange |
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 |
Field Detail |
---|
protected ScreenCredit screenCredit
Constructor Detail |
---|
public AbstractLayer()
Method Detail |
---|
public void dispose()
dispose
in interface Disposable
protected void doPick(DrawContext dc, Point point)
protected void doPreRender(DrawContext dc)
protected abstract void doRender(DrawContext dc)
public long getExpiryTime()
Layer
getExpiryTime
in interface Layer
public double getMaxActiveAltitude()
public double getMinActiveAltitude()
public String getName()
Layer
Layer.setName(java.lang.String)
.
getName
in interface Layer
public double getOpacity()
Layer
getOpacity
in interface Layer
public String getRestorableState()
Restorable
restoreState
and passing the XML document.
getRestorableState
in interface Restorable
public double getScale()
Layer
getScale
in interface Layer
protected ScreenCredit getScreenCredit()
public boolean isAtMaxResolution()
Layer
true
.
Typically such layers also return false
from Layer.isMultiResolution()
.
isAtMaxResolution
in interface Layer
true
if the layer is at maximum resolution, otherwise false
.public boolean isEnabled()
Layer
isEnabled
in interface Layer
public boolean isLayerActive(DrawContext dc)
dc
- the current draw context
true
if the layer is active, false
otherwise.public boolean isLayerInView(DrawContext dc)
dc
- the current draw context
true
if the layer is in the view, false
otherwise.public boolean isMultiResolution()
Layer
isMultiResolution
in interface Layer
true
if the layer provides multiple resolutions, else false
.public boolean isNetworkRetrievalEnabled()
Layer
isNetworkRetrievalEnabled
in interface Layer
true
if the layer is enabled to retrieve network data, else false
.public boolean isPickEnabled()
Layer
isPickEnabled
in interface Layer
true
if picking is enabled, else false
.public void pick(DrawContext dc, Point point)
Layer
WorldWindow.getObjectsAtCurrentPosition()
.
pick
in interface Layer
dc
- the current draw context for rendering.point
- the screen coordinate pointSelectEvent
public void preRender(DrawContext dc)
preRender
in interface Layer
public void render(DrawContext dc)
Layer
render
in interface Layer
dc
- the current draw context
IllegalArgumentException
- if dc
is null, or dc
's Globe
or
View
is nullpublic void restoreState(String stateInXml)
Restorable
restoreState
in interface Restorable
stateInXml
- an XML document string describing an object's state.public void setEnabled(boolean enabled)
Layer
setEnabled
in interface Layer
enabled
- true
if the layer is enabled, else false
.public void setExpiryTime(long expiryTime)
Layer
setExpiryTime
in interface Layer
expiryTime
- 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)
public void setMinActiveAltitude(double minActiveAltitude)
public void setName(String name)
Layer
setName
in interface Layer
name
- the name to assign to the layer.public void setNetworkRetrievalEnabled(boolean networkDownloadEnabled)
Layer
setNetworkRetrievalEnabled
in interface Layer
networkDownloadEnabled
- true
if network retrieval is allowed, else false
.public void setOpacity(double opacity)
Layer
setOpacity
in interface Layer
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.public void setPickEnabled(boolean pickable)
Layer
setPickEnabled
in interface Layer
pickable
- true
if the layer should perform picking, else false
.protected void setScreenCredit(ScreenCredit screenCredit)
public String toString()
toString
in class Object
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |