Class DuplicateAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.gui.dialogs.layer.DuplicateAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
,IEnabledStateUpdating
public final class DuplicateAction extends javax.swing.AbstractAction implements IEnabledStateUpdating
The action to duplicate the given selected layer into another layer.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Layer
layer
private LayerListDialog.LayerListModel
model
-
Constructor Summary
Constructors Constructor Description DuplicateAction(LayerListDialog.LayerListModel model)
Constructs a newDuplicateAction
.DuplicateAction(Layer layer, LayerListDialog.LayerListModel model)
Constructs a newDuplicateAction
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
private static void
duplicate(Layer layer)
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
-
DuplicateAction
public DuplicateAction(Layer layer, LayerListDialog.LayerListModel model)
Constructs a newDuplicateAction
.- Parameters:
layer
- the layermodel
- layer list model- Throws:
java.lang.IllegalArgumentException
- iflayer
is null
-
DuplicateAction
public DuplicateAction(LayerListDialog.LayerListModel model)
Constructs a newDuplicateAction
.- Parameters:
model
- layer list model
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
updateEnabledState
public void updateEnabledState()
Description copied from interface:IEnabledStateUpdating
Called after the layer model has changed.- Specified by:
updateEnabledState
in interfaceIEnabledStateUpdating
-
-