Class AbstractFeatureLayer
- java.lang.Object
-
- javax.swing.AbstractAction
-
- gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeature
-
- gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeatureLayer
-
- 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:
Compass
,Navigation
,ScaleBar
public abstract class AbstractFeatureLayer extends AbstractFeature
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Layer
layer
-
Fields inherited from class gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeature
controller, featureID
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractFeatureLayer(java.lang.String featureTitle, java.lang.String featureID, java.lang.String iconFilePath, boolean twoState, Registry registry)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
doActionPerformed(java.awt.event.ActionEvent actionEvent)
protected abstract Layer
doAddLayer()
void
initialize(Controller controller)
boolean
isOn()
boolean
isTwoState()
Indicates whether the feature can be either on or off, without any other states.void
setEnabled(boolean tf)
void
turnOn(boolean tf)
-
Methods inherited from class gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeature
actionPerformed, addToToolBar, 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
-
-
-
-
Field Detail
-
layer
protected Layer layer
-
-
Constructor Detail
-
AbstractFeatureLayer
protected AbstractFeatureLayer(java.lang.String featureTitle, java.lang.String featureID, java.lang.String iconFilePath, boolean twoState, Registry registry)
-
-
Method Detail
-
doAddLayer
protected abstract Layer doAddLayer()
-
initialize
public void initialize(Controller controller)
- Specified by:
initialize
in interfaceInitializable
- Overrides:
initialize
in classAbstractFeature
-
setEnabled
public void setEnabled(boolean tf)
- Specified by:
setEnabled
in interfacejavax.swing.Action
- Overrides:
setEnabled
in classjavax.swing.AbstractAction
-
isOn
public boolean isOn()
- Specified by:
isOn
in interfaceFeature
- Overrides:
isOn
in classAbstractFeature
-
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.
-
turnOn
public void turnOn(boolean tf)
- Specified by:
turnOn
in interfaceFeature
- Overrides:
turnOn
in classAbstractFeature
-
doActionPerformed
protected void doActionPerformed(java.awt.event.ActionEvent actionEvent)
- Overrides:
doActionPerformed
in classAbstractFeature
-
-