Class DeleteLayerAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.gui.dialogs.layer.DeleteLayerAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action,IEnabledStateUpdating,Layer.LayerAction
public final class DeleteLayerAction extends javax.swing.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.LayerListModelmodel
-
Constructor Summary
Constructors Constructor Description DeleteLayerAction(LayerListDialog.LayerListModel model)Creates aDeleteLayerActionwhich will delete the currently selected layers in the layer dialog.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)java.awt.ComponentcreateMenuComponent()Creates and return the menu component.booleanequals(java.lang.Object obj)inthashCode()booleansupportLayers(java.util.List<Layer> layers)Determines if this action supports a given list of layers.voidupdateEnabledState()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 aDeleteLayerActionwhich will delete the currently selected layers in the layer dialog.- Parameters:
model- layer list model
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
-
updateEnabledState
public void updateEnabledState()
Description copied from interface:IEnabledStateUpdatingCalled after the layer model has changed.- Specified by:
updateEnabledStatein interfaceIEnabledStateUpdating
-
createMenuComponent
public java.awt.Component createMenuComponent()
Description copied from interface:Layer.LayerActionCreates and return the menu component.- Specified by:
createMenuComponentin interfaceLayer.LayerAction- Returns:
- the menu component
-
supportLayers
public boolean supportLayers(java.util.List<Layer> layers)
Description copied from interface:Layer.LayerActionDetermines if this action supports a given list of layers.- Specified by:
supportLayersin interfaceLayer.LayerAction- Parameters:
layers- list of layers- Returns:
trueif this action supports the given list of layers,falseotherwise
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-