示例#1
0
 public void setXEmbedDropTarget() {
   // Register a drop site on the top level.
   Runnable r =
       new Runnable() {
         public void run() {
           target.setDropTarget(new XEmbedDropTarget());
         }
       };
   SunToolkit.executeOnEventHandlerThread(target, r);
 }
示例#2
0
 static byte[] getBData(KeyEvent e) {
   try {
     if (bdataField == null) {
       bdataField = SunToolkit.getField(java.awt.AWTEvent.class, "bdata");
     }
     return (byte[]) bdataField.get(e);
   } catch (IllegalAccessException ex) {
     return null;
   }
 }
示例#3
0
 public void removeXEmbedDropTarget() {
   // Unregister a drop site on the top level.
   Runnable r =
       new Runnable() {
         public void run() {
           if (target.getDropTarget() instanceof XEmbedDropTarget) {
             target.setDropTarget(null);
           }
         }
       };
   SunToolkit.executeOnEventHandlerThread(target, r);
 }