javax.swing
Class TransferHandler.TransferAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byjavax.swing.TransferHandler.TransferAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable, UIResource
Enclosing class:
TransferHandler

static class TransferHandler.TransferAction
extends AbstractAction
implements UIResource


Nested Class Summary
 
Nested classes inherited from class javax.swing.AbstractAction
AbstractAction.ArrayTable
 
Field Summary
private  boolean canAccessSystemClipboard
          Indicates if it is safe to access the system clipboard.
private static Object SandboxClipboardKey
          Key used in app context to lookup Clipboard to use if access to System clipboard is denied.
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
(package private) TransferHandler.TransferAction(String name)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
          Invoked when an action occurs.
private  boolean canAccessSystemClipboard()
          Returns true if it is safe to access the system Clipboard.
private  Clipboard getClipboard(JComponent c)
          Returns the clipboard to use for cut/copy/paste.
 
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

canAccessSystemClipboard

private boolean canAccessSystemClipboard
Indicates if it is safe to access the system clipboard. Once false, access will never be checked again.


SandboxClipboardKey

private static Object SandboxClipboardKey
Key used in app context to lookup Clipboard to use if access to System clipboard is denied.

Constructor Detail

TransferHandler.TransferAction

TransferHandler.TransferAction(String name)
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.

Specified by:
actionPerformed in interface ActionListener

getClipboard

private Clipboard getClipboard(JComponent c)
Returns the clipboard to use for cut/copy/paste.


canAccessSystemClipboard

private boolean canAccessSystemClipboard()
Returns true if it is safe to access the system Clipboard. If the environment is headless or the security manager does not allow access to the system clipboard, a private clipboard is used.