src/solaris/classes/sun/awt/X11/XInputMethod.java

Print this page




  85     }
  86 
  87     public static long getXICFocus() {
  88         return xicFocus;
  89     }
  90 
  91 /* XAWT_HACK  FIX ME!
  92    do NOT call client code!
  93 */
  94     protected Container getParent(Component client) {
  95         return client.getParent();
  96     }
  97 
  98     /**
  99      * Returns peer of the given client component. If the given client component
 100      * doesn't have peer, peer of the native container of the client is returned.
 101      */
 102     protected ComponentPeer getPeer(Component client) {
 103         XComponentPeer peer;
 104 
 105         if (log.isLoggable(PlatformLogger.FINE)) {
 106             log.fine("Client is " + client);
 107         }
 108         peer = (XComponentPeer)XToolkit.targetToPeer(client);
 109         while (client != null && peer == null) {
 110             client = getParent(client);
 111             peer = (XComponentPeer)XToolkit.targetToPeer(client);
 112         }
 113         if (log.isLoggable(PlatformLogger.FINE)) {
 114             log.fine("Peer is {0}, client is {1}", peer, client);
 115         }
 116 
 117         if (peer != null)
 118             return peer;
 119 
 120         return null;
 121     }
 122 
 123     /*
 124      * Subclasses should override disposeImpl() instead of dispose(). Client
 125      * code should always invoke dispose(), never disposeImpl().
 126      */
 127     protected synchronized void disposeImpl() {
 128         super.disposeImpl();
 129         clientComponentWindow = null;
 130     }
 131 
 132     protected void awtLock() {
 133         XToolkit.awtLock();


  85     }
  86 
  87     public static long getXICFocus() {
  88         return xicFocus;
  89     }
  90 
  91 /* XAWT_HACK  FIX ME!
  92    do NOT call client code!
  93 */
  94     protected Container getParent(Component client) {
  95         return client.getParent();
  96     }
  97 
  98     /**
  99      * Returns peer of the given client component. If the given client component
 100      * doesn't have peer, peer of the native container of the client is returned.
 101      */
 102     protected ComponentPeer getPeer(Component client) {
 103         XComponentPeer peer;
 104 
 105         if (log.isLoggable(PlatformLogger.Level.FINE)) {
 106             log.fine("Client is " + client);
 107         }
 108         peer = (XComponentPeer)XToolkit.targetToPeer(client);
 109         while (client != null && peer == null) {
 110             client = getParent(client);
 111             peer = (XComponentPeer)XToolkit.targetToPeer(client);
 112         }
 113         if (log.isLoggable(PlatformLogger.Level.FINE)) {
 114             log.fine("Peer is {0}, client is {1}", peer, client);
 115         }
 116 
 117         if (peer != null)
 118             return peer;
 119 
 120         return null;
 121     }
 122 
 123     /*
 124      * Subclasses should override disposeImpl() instead of dispose(). Client
 125      * code should always invoke dispose(), never disposeImpl().
 126      */
 127     protected synchronized void disposeImpl() {
 128         super.disposeImpl();
 129         clientComponentWindow = null;
 130     }
 131 
 132     protected void awtLock() {
 133         XToolkit.awtLock();