NASA World Wind

gov.nasa.worldwindx.applications.worldwindow.features
Class AbstractOnDemandLayerFeature

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeature
          extended by gov.nasa.worldwindx.applications.worldwindow.features.AbstractOnDemandLayerFeature
All Implemented Interfaces:
Initializable, Feature, ActionListener, PropertyChangeListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
CoordinatesDisplay, Crosshair, GraticuleLayer

public abstract class AbstractOnDemandLayerFeature
extends AbstractFeature

See Also:
Serialized Form

Field Summary
protected  String group
           
protected  Layer layer
           
protected  boolean on
           
 
Fields inherited from class gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeature
controller, featureID
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
AbstractOnDemandLayerFeature(String s, String featureID, String iconPath, String group, Registry registry)
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 

Field Detail

group

protected String group

layer

protected Layer layer

on

protected boolean on
Constructor Detail

AbstractOnDemandLayerFeature

public AbstractOnDemandLayerFeature(String s,
                                    String featureID,
                                    String iconPath,
                                    String group,
                                    Registry registry)
Method Detail

addLayer

protected void addLayer(LayerPath path)

createLayer

protected abstract Layer createLayer()

isOn

public boolean isOn()
Specified by:
isOn in interface Feature
Overrides:
isOn in class AbstractFeature

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 interface Feature
Overrides:
isTwoState in class AbstractFeature
Returns:
true if the feature has only two states, otherwise off.

removeLayer

protected void removeLayer()

turnOn

public void turnOn(boolean tf)
Specified by:
turnOn in interface Feature
Overrides:
turnOn in class AbstractFeature

NASA World Wind