gov.nasa.worldwind.layers
Class AbstractLayer
java.lang.Object
gov.nasa.worldwind.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.layers.AbstractLayer
- All Implemented Interfaces:
- AVList, Disposable, Layer, WWObject, PropertyChangeListener, EventListener
- Direct Known Subclasses:
- CompassLayer, IconLayer, PlaceNameLayer, RenderableLayer, RpfLayer, TiledImageLayer, TrackLayer
public abstract class AbstractLayer
- extends WWObjectImpl
- implements Layer
| Methods inherited from class gov.nasa.worldwind.AVListImpl |
addPropertyChangeListener, addPropertyChangeListener, copy, firePropertyChange, firePropertyChange, getStringValue, getValue, hasKey, propertyChange, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue |
| Methods inherited from interface gov.nasa.worldwind.AVList |
addPropertyChangeListener, addPropertyChangeListener, copy, firePropertyChange, firePropertyChange, getStringValue, getValue, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue |
AbstractLayer
public AbstractLayer()
dispose
public void dispose()
- Specified by:
dispose in interface Disposable
doPick
protected void doPick(DrawContext dc,
Point point)
doRender
protected abstract void doRender(DrawContext dc)
getMaxActiveAltitude
public double getMaxActiveAltitude()
getMinActiveAltitude
public double getMinActiveAltitude()
getName
public String getName()
- Specified by:
getName in interface Layer
getOpacity
public double getOpacity()
- Specified by:
getOpacity in interface Layer
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled in interface Layer
isLayerActive
public boolean isLayerActive(DrawContext dc)
- Indicates whether the layer is active based on arbitrary criteria. The method implemented here is a default
indicating the layer is active if the current altitude is within the layer's min and max active altitudes.
Subclasses able to consider more criteria should override this implementation.
- Parameters:
dc - the current draw context
- Returns:
true if the layer is active, false otherwise.
isLayerInView
public boolean isLayerInView(DrawContext dc)
- Indicates whether the layer is in the view. The method implemented here is a default indicating the layer is in
view. Subclasses able to determine their presence in the view should override this implementation.
- Parameters:
dc - the current draw context
- Returns:
true if the layer is in the view, false otherwise.
isPickEnabled
public boolean isPickEnabled()
- Specified by:
isPickEnabled in interface Layer
pick
public void pick(DrawContext dc,
Point point)
- Specified by:
pick in interface Layer
render
public void render(DrawContext dc)
- Specified by:
render in interface Layer
- Parameters:
dc - the current draw context
- Throws:
IllegalArgumentException - if dc is null, or dc's Globe or
View is null
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabled in interface Layer
setMaxActiveAltitude
public void setMaxActiveAltitude(double maxActiveAltitude)
setMinActiveAltitude
public void setMinActiveAltitude(double minActiveAltitude)
setName
public void setName(String name)
- Specified by:
setName in interface Layer
setOpacity
public void setOpacity(double opacity)
- Specified by:
setOpacity in interface Layer
setPickEnabled
public void setPickEnabled(boolean pickable)
- Specified by:
setPickEnabled in interface Layer
toString
public String toString()
- Overrides:
toString in class Object