Class AbstractOnDemandLayerFeature
- java.lang.Object
-
- javax.swing.AbstractAction
-
- gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeature
-
- gov.nasa.worldwindx.applications.worldwindow.features.AbstractOnDemandLayerFeature
-
- All Implemented Interfaces:
Initializable
,Feature
,java.awt.event.ActionListener
,java.beans.PropertyChangeListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
- Direct Known Subclasses:
CoordinatesDisplay
,Crosshair
,GraticuleLayer
public abstract class AbstractOnDemandLayerFeature extends AbstractFeature
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
group
protected Layer
layer
protected boolean
on
-
Fields inherited from class gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeature
controller, featureID
-
-
Constructor Summary
Constructors Constructor Description AbstractOnDemandLayerFeature(java.lang.String s, java.lang.String featureID, java.lang.String iconPath, java.lang.String group, Registry registry)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addLayer(LayerPath path)
protected abstract Layer
createLayer()
boolean
isOn()
boolean
isTwoState()
Indicates whether the feature can be either on or off, without any other states.protected void
removeLayer()
void
turnOn(boolean tf)
-
Methods inherited from class gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeature
actionPerformed, addToToolBar, doActionPerformed, doPropertyChange, getController, getFeatureID, getName, getStringValue, initialize, isInitialized, propertyChange, register, setMenuAccellerator
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
group
protected java.lang.String group
-
layer
protected Layer layer
-
on
protected boolean on
-
-
Constructor Detail
-
AbstractOnDemandLayerFeature
public AbstractOnDemandLayerFeature(java.lang.String s, java.lang.String featureID, java.lang.String iconPath, java.lang.String group, Registry registry)
-
-
Method Detail
-
createLayer
protected abstract Layer createLayer()
-
isTwoState
public boolean isTwoState()
Description copied from interface:Feature
Indicates whether the feature can be either on or off, without any other states. This is used by the tool bar and menu-bar menus to determine whether the feature's enable/disable button or menu item should be displayed with an indicator that it's either on or off. In the case of a menu the indicator is a check box. In the case of a tool bar button the indicator is a dot above the button.- Specified by:
isTwoState
in interfaceFeature
- Overrides:
isTwoState
in classAbstractFeature
- Returns:
- true if the feature has only two states, otherwise off.
-
isOn
public boolean isOn()
- Specified by:
isOn
in interfaceFeature
- Overrides:
isOn
in classAbstractFeature
-
turnOn
public void turnOn(boolean tf)
- Specified by:
turnOn
in interfaceFeature
- Overrides:
turnOn
in classAbstractFeature
-
addLayer
protected void addLayer(LayerPath path)
-
removeLayer
protected void removeLayer()
-
-