Class CopyKeyValueAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.gui.dialogs.properties.AbstractCopyAction
-
- org.openstreetmap.josm.gui.dialogs.properties.CopyKeyValueAction
-
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
,PopupMenuListener
public class CopyKeyValueAction extends AbstractCopyAction implements PopupMenuListener
Copy the key and value of the selected tag(s) to clipboard.- Since:
- 13521
- See Also:
- Serialized Form
-
-
Field Summary
-
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 CopyKeyValueAction(JTable tagTable, IntFunction<String> keyFn, Supplier<Collection<? extends Tagged>> objectSp)
Constructs a newCopyKeyValueAction
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Collection<String>
getString(Tagged p, String key)
void
popupMenuCanceled(PopupMenuEvent e)
void
popupMenuWillBecomeInvisible(PopupMenuEvent e)
void
popupMenuWillBecomeVisible(PopupMenuEvent e)
private void
setName(long n)
-
Methods inherited from class org.openstreetmap.josm.gui.dialogs.properties.AbstractCopyAction
actionPerformed, valueStream
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Constructor Detail
-
CopyKeyValueAction
public CopyKeyValueAction(JTable tagTable, IntFunction<String> keyFn, Supplier<Collection<? extends Tagged>> objectSp)
Constructs a newCopyKeyValueAction
.- Parameters:
tagTable
- the tag tablekeyFn
- a function which returns the selected key for a given row indexobjectSp
- a supplier which returns the selected tagged object(s)
-
-
Method Detail
-
setName
private void setName(long n)
-
getString
protected Collection<String> getString(Tagged p, String key)
- Specified by:
getString
in classAbstractCopyAction
-
popupMenuWillBecomeVisible
public void popupMenuWillBecomeVisible(PopupMenuEvent e)
- Specified by:
popupMenuWillBecomeVisible
in interfacePopupMenuListener
-
popupMenuWillBecomeInvisible
public void popupMenuWillBecomeInvisible(PopupMenuEvent e)
- Specified by:
popupMenuWillBecomeInvisible
in interfacePopupMenuListener
-
popupMenuCanceled
public void popupMenuCanceled(PopupMenuEvent e)
- Specified by:
popupMenuCanceled
in interfacePopupMenuListener
-
-