jdk/src/share/classes/javax/swing/text/JTextComponent.java
changeset 3084 67ca55732362
parent 1287 a04aca99c77a
child 3737 83fb4621a129
--- a/jdk/src/share/classes/javax/swing/text/JTextComponent.java	Fri Jun 19 16:49:50 2009 -0400
+++ b/jdk/src/share/classes/javax/swing/text/JTextComponent.java	Tue Jun 23 13:35:58 2009 +0400
@@ -76,6 +76,7 @@
 import sun.swing.PrintingStatus;
 import sun.swing.SwingUtilities2;
 import sun.swing.text.TextComponentPrintable;
+import sun.swing.SwingAccessor;
 
 /**
  * <code>JTextComponent</code> is the base class for swing text
@@ -761,6 +762,23 @@
         return dropMode;
     }
 
+    static {
+        SwingAccessor.setJTextComponentAccessor(
+            new SwingAccessor.JTextComponentAccessor() {
+                public TransferHandler.DropLocation dropLocationForPoint(JTextComponent textComp,
+                                                                         Point p)
+                {
+                    return textComp.dropLocationForPoint(p);
+                }
+                public Object setDropLocation(JTextComponent textComp,
+                                              TransferHandler.DropLocation location,
+                                              Object state, boolean forDrop)
+                {
+                    return textComp.setDropLocation(location, state, forDrop);
+                }
+            });
+    }
+
 
     /**
      * Calculates a drop location in this component, representing where a