Class AbstractCopyAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.gui.dialogs.properties.AbstractCopyAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
- Direct Known Subclasses:
CopyAllKeyValueAction
,CopyKeyValueAction
,CopyValueAction
public abstract class AbstractCopyAction extends javax.swing.AbstractAction
Super class of all copy actions from tag table.- Since:
- 13521
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.IntFunction<java.lang.String>
keySupplier
private java.util.function.Supplier<java.util.Collection<? extends Tagged>>
objectSupplier
private javax.swing.JTable
tagTable
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCopyAction(javax.swing.JTable tagTable, java.util.function.IntFunction<java.lang.String> keySupplier, java.util.function.Supplier<java.util.Collection<? extends Tagged>> objectSupplier)
Constructs a newAbstractCopyAction
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent ae)
protected abstract java.util.Collection<java.lang.String>
getString(Tagged p, java.lang.String key)
protected java.util.stream.Stream<java.lang.String>
valueStream()
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
tagTable
private final javax.swing.JTable tagTable
-
keySupplier
private final java.util.function.IntFunction<java.lang.String> keySupplier
-
objectSupplier
private final java.util.function.Supplier<java.util.Collection<? extends Tagged>> objectSupplier
-
-
Constructor Detail
-
AbstractCopyAction
protected AbstractCopyAction(javax.swing.JTable tagTable, java.util.function.IntFunction<java.lang.String> keySupplier, java.util.function.Supplier<java.util.Collection<? extends Tagged>> objectSupplier)
Constructs a newAbstractCopyAction
.- Parameters:
tagTable
- the tag tablekeySupplier
- a supplier which returns the selected key for a given row indexobjectSupplier
- a supplier which returns the selected tagged object(s)
-
-
Method Detail
-
getString
protected abstract java.util.Collection<java.lang.String> getString(Tagged p, java.lang.String key)
-
valueStream
protected java.util.stream.Stream<java.lang.String> valueStream()
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent ae)
-
-