Package org.openstreetmap.josm.actions
Class RestorePropertyAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.actions.RestorePropertyAction
-
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
public class RestorePropertyAction extends AbstractAction
Obtains the selected key and values from a table and restores those properties on the specified primitive.- Since:
- 16593
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private IntFunction<String>
keyFn
private Supplier<OsmPrimitive>
objectSp
private ListSelectionModel
selectionModel
private IntFunction<String>
valueFn
-
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 RestorePropertyAction(IntFunction<String> keyFn, IntFunction<String> valueFn, Supplier<OsmPrimitive> objectSp, ListSelectionModel selectionModel)
Constructs a newRestorePropertyAction
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(ActionEvent e)
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
keyFn
private final IntFunction<String> keyFn
-
valueFn
private final IntFunction<String> valueFn
-
objectSp
private final Supplier<OsmPrimitive> objectSp
-
selectionModel
private final ListSelectionModel selectionModel
-
-
Constructor Detail
-
RestorePropertyAction
public RestorePropertyAction(IntFunction<String> keyFn, IntFunction<String> valueFn, Supplier<OsmPrimitive> objectSp, ListSelectionModel selectionModel)
Constructs a newRestorePropertyAction
.- Parameters:
keyFn
- a function which returns the selected key for a given row indexvalueFn
- a function which returns the selected value for a given row indexobjectSp
- a supplier which returns the selected tagged objectselectionModel
- selection model
-
-
Method Detail
-
actionPerformed
public void actionPerformed(ActionEvent e)
-
-