Exemplo n.º 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);
 }
Exemplo n.º 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;
   }
 }
Exemplo n.º 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);
 }