org.openstreetmap.josm.plugins.streetside.gui.imageinfo

## Class ClipboardAction

- java.lang.Object
- - javax.swing.AbstractAction
  - - org.openstreetmap.josm.plugins.streetside.gui.imageinfo.ClipboardAction

- All Implemented Interfaces:
    ActionListener, Serializable, Cloneable, EventListener, Action

      public class ClipboardAction
      extends AbstractAction

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Transferable` | `contents` The contents that are transfered into the clipboard when the action is executed.
    `private long` | `lastPopupShowTime` The UNIX epoch time when the popup for this action was shown the last time
    `private JPopupMenu` | `popup` A small popup that shows up when the key has been moved to the clipboard
    `private static long` | `POPUP_DURATION` The duration in milliseconds for which the popup will be shown
    `private Component` | `popupParent` The component which is used as parent of the shown popup.
    `private static long` | `serialVersionUID`

    - ### 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 and Description
    `ClipboardAction(String name, Transferable contents)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionPerformed(ActionEvent e)`
    `void` | `setContents(Transferable contents)`
    `void` | `setPopupParent(Component popupParent)` Sets the component, under which the popup will be shown, which indicates that the key was copied to the clipboard.

    - ### Methods inherited from class javax.swing.AbstractAction

      `addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### serialVersionUID

          private static final long serialVersionUID

      See Also:
        Constant Field Values

    - #### POPUP_DURATION

          private static final long POPUP_DURATION

      The duration in milliseconds for which the popup will be shown
      See Also:
        Constant Field Values

    - #### popup

          private final JPopupMenu popup

      A small popup that shows up when the key has been moved to the clipboard

    - #### popupParent

          private Component popupParent

      The component which is used as parent of the shown popup. If this is `null`, no popup will be shown.

    - #### lastPopupShowTime

          private long lastPopupShowTime

      The UNIX epoch time when the popup for this action was shown the last time

    - #### contents

          private Transferable contents

      The contents that are transfered into the clipboard when the action is executed. If this is `null`, the clipboard won't be changed.

  - ### Constructor Detail

    - #### ClipboardAction

          public ClipboardAction(String name,
                                 Transferable contents)

  - ### Method Detail

    - #### setContents

          public void setContents(Transferable contents)

      Parameters:
        `contents` - the contents, which should be copied to the clipboard when the `Action` is executed

    - #### setPopupParent

          public void setPopupParent(Component popupParent)

      Sets the component, under which the popup will be shown, which indicates that the key was copied to the clipboard.
      Parameters:
        `popupParent` - the component to set as parent of the popup

    - #### actionPerformed

          public void actionPerformed(ActionEvent e)

JOSM Plugins