29 import java.awt.datatransfer.*; 30 import java.awt.dnd.*; 31 import java.beans.*; 32 import java.lang.reflect.*; 33 import java.io.*; 34 import java.util.TooManyListenersException; 35 import javax.swing.plaf.UIResource; 36 import javax.swing.event.*; 37 import javax.swing.text.JTextComponent; 38 39 import sun.reflect.misc.MethodUtil; 40 import sun.swing.SwingUtilities2; 41 import sun.awt.AppContext; 42 import sun.swing.*; 43 import sun.awt.SunToolkit; 44 45 import java.security.AccessController; 46 import java.security.PrivilegedAction; 47 48 import java.security.AccessControlContext; 49 import java.security.ProtectionDomain; 50 import jdk.internal.misc.SharedSecrets; 51 import jdk.internal.misc.JavaSecurityAccess; 52 53 import sun.awt.AWTAccessor; 54 55 /** 56 * This class is used to handle the transfer of a <code>Transferable</code> 57 * to and from Swing components. The <code>Transferable</code> is used to 58 * represent data that is exchanged via a cut, copy, or paste 59 * to/from a clipboard. It is also used in drag-and-drop operations 60 * to represent a drag from a component, and a drop to a component. 61 * Swing provides functionality that automatically supports cut, copy, 62 * and paste keyboard bindings that use the functionality provided by 63 * an implementation of this class. Swing also provides functionality 64 * that automatically supports drag and drop that uses the functionality 65 * provided by an implementation of this class. The Swing developer can 66 * concentrate on specifying the semantics of a transfer primarily by setting 67 * the <code>transferHandler</code> property on a Swing component. 68 * <p> 69 * This class is implemented to provide a default behavior of transferring 70 * a component property simply by specifying the name of the property in 71 * the constructor. For example, to transfer the foreground color from | 29 import java.awt.datatransfer.*; 30 import java.awt.dnd.*; 31 import java.beans.*; 32 import java.lang.reflect.*; 33 import java.io.*; 34 import java.util.TooManyListenersException; 35 import javax.swing.plaf.UIResource; 36 import javax.swing.event.*; 37 import javax.swing.text.JTextComponent; 38 39 import sun.reflect.misc.MethodUtil; 40 import sun.swing.SwingUtilities2; 41 import sun.awt.AppContext; 42 import sun.swing.*; 43 import sun.awt.SunToolkit; 44 45 import java.security.AccessController; 46 import java.security.PrivilegedAction; 47 48 import java.security.AccessControlContext; 49 50 import jdk.internal.access.SharedSecrets; 51 import jdk.internal.access.JavaSecurityAccess; 52 53 import sun.awt.AWTAccessor; 54 55 /** 56 * This class is used to handle the transfer of a <code>Transferable</code> 57 * to and from Swing components. The <code>Transferable</code> is used to 58 * represent data that is exchanged via a cut, copy, or paste 59 * to/from a clipboard. It is also used in drag-and-drop operations 60 * to represent a drag from a component, and a drop to a component. 61 * Swing provides functionality that automatically supports cut, copy, 62 * and paste keyboard bindings that use the functionality provided by 63 * an implementation of this class. Swing also provides functionality 64 * that automatically supports drag and drop that uses the functionality 65 * provided by an implementation of this class. The Swing developer can 66 * concentrate on specifying the semantics of a transfer primarily by setting 67 * the <code>transferHandler</code> property on a Swing component. 68 * <p> 69 * This class is implemented to provide a default behavior of transferring 70 * a component property simply by specifying the name of the property in 71 * the constructor. For example, to transfer the foreground color from |