コード例 #1
0
 void unregisterAccelerator(AWTKeyStroke stroke) {
   if (stroke == null) return;
   if (embedder != null && embedder.isActive()) {
     int index = strokes.indexOf(stroke);
     embedder.unregisterAccelerator(index);
   }
 }
コード例 #2
0
 void notifyStopped() {
   if (embedder != null && embedder.isActive()) {
     for (int i = strokes.size() - 1; i >= 0; i--) {
       embedder.unregisterAccelerator(i);
     }
   }
 }
コード例 #3
0
 void registerAccelerator(AWTKeyStroke stroke) {
   if (stroke == null) return;
   strokes.add(stroke);
   if (embedder != null && embedder.isActive()) {
     embedder.registerAccelerator(stroke, strokes.size() - 1);
   }
 }
コード例 #4
0
 protected void traverseOutBackward() {
   if (embedder != null && embedder.isActive()) {
     if (embedder.isApplicationActive()) {
       xembedLog.fine("Traversing out Backward");
       embedder.traverseOutBackward();
     }
   }
 }
コード例 #5
0
 protected boolean isEventDisabled(XEvent e) {
   if (embedder != null && embedder.isActive()) {
     switch (e.get_type()) {
       case XConstants.FocusIn:
       case XConstants.FocusOut:
         return true;
     }
   }
   return super.isEventDisabled(e);
 }
コード例 #6
0
 public boolean requestWindowFocus(long time, boolean timeProvided) {
   // Should check for active state of host application
   if (embedder != null && embedder.isActive()) {
     xembedLog.fine("Requesting focus from embedding host");
     return embedder.requestFocus();
   } else {
     xembedLog.fine("Requesting focus from X");
     return super.requestWindowFocus(time, timeProvided);
   }
 }
コード例 #7
0
 void notifyStarted() {
   // Register accelerators
   if (embedder != null && embedder.isActive()) {
     int i = 0;
     Iterator<AWTKeyStroke> iter = strokes.iterator();
     while (iter.hasNext()) {
       embedder.registerAccelerator(iter.next(), i++);
     }
   }
   // Now we know that the the embedder is an XEmbed server, so we
   // reregister the drop target to enable XDnD protocol support via
   // XEmbed.
   updateDropTarget();
 }
コード例 #8
0
 boolean isXEmbedActive() {
   return embedder != null && embedder.isActive();
 }