Class DeleteLayerAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.gui.dialogs.layer.DeleteLayerAction
-
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
,IEnabledStateUpdating
,Layer.LayerAction
public final class DeleteLayerAction extends AbstractAction implements IEnabledStateUpdating, Layer.LayerAction
The action to delete the currently selected layer- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private LayerListDialog.LayerListModel
model
-
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
Constructors Constructor Description DeleteLayerAction(LayerListDialog.LayerListModel model)
Creates aDeleteLayerAction
which will delete the currently selected layers in the layer dialog.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(ActionEvent e)
Component
createMenuComponent()
Creates and return the menu component.boolean
equals(Object obj)
int
hashCode()
boolean
supportLayers(List<Layer> layers)
Determines if this action supports a given list of layers.void
updateEnabledState()
Called after the layer model has changed.-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
model
private final LayerListDialog.LayerListModel model
-
-
Constructor Detail
-
DeleteLayerAction
public DeleteLayerAction(LayerListDialog.LayerListModel model)
Creates aDeleteLayerAction
which will delete the currently selected layers in the layer dialog.- Parameters:
model
- layer list model
-
-
Method Detail
-
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformed
in interfaceActionListener
-
updateEnabledState
public void updateEnabledState()
Description copied from interface:IEnabledStateUpdating
Called after the layer model has changed.- Specified by:
updateEnabledState
in interfaceIEnabledStateUpdating
-
createMenuComponent
public Component createMenuComponent()
Description copied from interface:Layer.LayerAction
Creates and return the menu component.- Specified by:
createMenuComponent
in interfaceLayer.LayerAction
- Returns:
- the menu component
-
supportLayers
public boolean supportLayers(List<Layer> layers)
Description copied from interface:Layer.LayerAction
Determines if this action supports a given list of layers.- Specified by:
supportLayers
in interfaceLayer.LayerAction
- Parameters:
layers
- list of layers- Returns:
true
if this action supports the given list of layers,false
otherwise
-
-