NASA World Wind

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

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeature
All Implemented Interfaces:
Initializable, Feature, ActionListener, PropertyChangeListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
AbstractApplicationFeature, AbstractElevationsFeature, AbstractFeatureDialog, AbstractFeatureLayer, AbstractFeaturePanel, AbstractOnDemandLayerFeature, AbstractOpenResourceFeature, AppFrameImpl, AppPanelImpl, ControlsPanelImpl, ExternalLinkController, GazetteerPanel, Graticule, IconController, InfoPanelController, LayerManagerDialog, Measurement, MenuBarImpl, NetworkActivitySignal, StatusPanelImpl, ToolBarImpl, ToolTipController, WWPanelImpl, YahooGazetteer

public class AbstractFeature
extends AbstractAction
implements Feature

See Also:
Serialized Form

Field Summary
protected  Controller controller
           
protected  String 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
protected AbstractFeature(String s, String featureID, Registry registry)
           
protected AbstractFeature(String s, String featureID, String largeIconPath, Registry registry)
           
 
Method Summary
 void actionPerformed(ActionEvent actionEvent)
           
protected  void addToToolBar()
           
protected  void doActionPerformed(ActionEvent actionEvent)
           
 void doPropertyChange(PropertyChangeEvent propertyChangeEvent)
           
 Controller getController()
           
 String getFeatureID()
           
 String getName()
           
 String getStringValue(String key)
           
 void initialize(Controller controller)
           
 boolean isInitialized()
           
 boolean isOn()
           
 boolean isTwoState()
          Indicates whether the feature can be either on or off, without any other states.
 void propertyChange(PropertyChangeEvent propertyChangeEvent)
           
protected  Object register(String featureID, Registry registry)
           
protected  void setMenuAccellerator(Controller controller)
           
 void turnOn(boolean tf)
           
 
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

controller

protected Controller controller

featureID

protected String featureID
Constructor Detail

AbstractFeature

protected AbstractFeature(String s,
                          String featureID,
                          Registry registry)

AbstractFeature

protected AbstractFeature(String s,
                          String featureID,
                          String largeIconPath,
                          Registry registry)
Method Detail

actionPerformed

public void actionPerformed(ActionEvent actionEvent)
Specified by:
actionPerformed in interface ActionListener

addToToolBar

protected void addToToolBar()

doActionPerformed

protected void doActionPerformed(ActionEvent actionEvent)

doPropertyChange

public void doPropertyChange(PropertyChangeEvent propertyChangeEvent)

getController

public Controller getController()

getFeatureID

public String getFeatureID()
Specified by:
getFeatureID in interface Feature

getName

public String getName()
Specified by:
getName in interface Feature

getStringValue

public String getStringValue(String key)

initialize

public void initialize(Controller controller)
Specified by:
initialize in interface Initializable

isInitialized

public boolean isInitialized()
Specified by:
isInitialized in interface Initializable

isOn

public boolean isOn()
Specified by:
isOn in interface Feature

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
Returns:
true if the feature has only two states, otherwise off.

propertyChange

public void propertyChange(PropertyChangeEvent propertyChangeEvent)
Specified by:
propertyChange in interface PropertyChangeListener

register

protected Object register(String featureID,
                          Registry registry)

setMenuAccellerator

protected void setMenuAccellerator(Controller controller)

turnOn

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

NASA World Wind