NASA World Wind

gov.nasa.worldwindx.applications.worldwindow.features.swinglayermanager
Class ActiveLayersPanel

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.AbstractFeaturePanel
              extended by gov.nasa.worldwindx.applications.worldwindow.features.swinglayermanager.ActiveLayersPanel
All Implemented Interfaces:
Initializable, ActiveLayersManager, WWOPanel, Feature, FeaturePanel, ActionListener, PropertyChangeListener, Serializable, Cloneable, EventListener, Action

public class ActiveLayersPanel
extends AbstractFeaturePanel
implements ActiveLayersManager

See Also:
Serialized Form

Nested Class Summary
protected  class ActiveLayersPanel.ReorderListener
           
 
Field Summary
protected  ActiveLayersList jlist
           
protected  DefaultListModel model
           
protected static String TOOL_TIP
           
 
Fields inherited from class gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeaturePanel
panel
 
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
ActiveLayersPanel(Registry registry)
           
 
Method Summary
protected  void fillModel(LayerList layerList)
           
 void initialize(Controller controller)
           
 boolean isIncludeInternalLayers()
          Indicates whether to show internal layers, those whose attribute-value list contains Constants.INTERNAL_LAYER.
 boolean isOn()
           
 boolean isTwoState()
          Indicates whether the feature can be either on or off, without any other states.
protected  void refresh(PropertyChangeEvent event)
           
 void setIncludeInternalLayers(boolean includeInternalLayers)
          Specifies whether to show internal layers.
 void turnOn(boolean tf)
           
 void updateLayerList(LayerList layerList)
          Replace the contents of the model with the contents of a specified [@link LayerList}.
 
Methods inherited from class gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeaturePanel
getDialogControls, getJPanel
 
Methods inherited from class gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeature
actionPerformed, addToToolBar, doActionPerformed, doPropertyChange, getController, getFeatureID, getName, getStringValue, 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 gov.nasa.worldwindx.applications.worldwindow.features.Feature
getFeatureID, getName
 
Methods inherited from interface gov.nasa.worldwindx.applications.worldwindow.core.Initializable
isInitialized
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 

Field Detail

jlist

protected ActiveLayersList jlist

model

protected DefaultListModel model

TOOL_TIP

protected static final String TOOL_TIP
See Also:
Constant Field Values
Constructor Detail

ActiveLayersPanel

public ActiveLayersPanel(Registry registry)
Method Detail

fillModel

protected void fillModel(LayerList layerList)

initialize

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

isIncludeInternalLayers

public boolean isIncludeInternalLayers()
Description copied from interface: ActiveLayersManager
Indicates whether to show internal layers, those whose attribute-value list contains Constants.INTERNAL_LAYER.

Specified by:
isIncludeInternalLayers in interface ActiveLayersManager
Returns:
true if internal layers are shown, otherwise false.

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.

refresh

protected void refresh(PropertyChangeEvent event)

setIncludeInternalLayers

public void setIncludeInternalLayers(boolean includeInternalLayers)
Description copied from interface: ActiveLayersManager
Specifies whether to show internal layers.

Specified by:
setIncludeInternalLayers in interface ActiveLayersManager
Parameters:
includeInternalLayers - true for internal layers to be shown, otherwise false.

turnOn

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

updateLayerList

public void updateLayerList(LayerList layerList)
Description copied from interface: ActiveLayersManager
Replace the contents of the model with the contents of a specified [@link LayerList}.

Specified by:
updateLayerList in interface ActiveLayersManager
Parameters:
layerList - the layer list to display.

NASA World Wind