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)) log.fine("Client is " + client);


 106         peer = (XComponentPeer)XToolkit.targetToPeer(client);
 107         while (client != null && peer == null) {
 108             client = getParent(client);
 109             peer = (XComponentPeer)XToolkit.targetToPeer(client);
 110         }
 111         log.fine("Peer is {0}, client is {1}", peer, client);
 112 
 113         if (peer != null)
 114             return peer;
 115 
 116         return null;
 117     }
 118 
 119     /*
 120      * Subclasses should override disposeImpl() instead of dispose(). Client
 121      * code should always invoke dispose(), never disposeImpl().
 122      */
 123     protected synchronized void disposeImpl() {
 124         super.disposeImpl();
 125         clientComponentWindow = null;




  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         log.fine("Peer is {0}, client is {1}", peer, client);
 114 
 115         if (peer != null)
 116             return peer;
 117 
 118         return null;
 119     }
 120 
 121     /*
 122      * Subclasses should override disposeImpl() instead of dispose(). Client
 123      * code should always invoke dispose(), never disposeImpl().
 124      */
 125     protected synchronized void disposeImpl() {
 126         super.disposeImpl();
 127         clientComponentWindow = null;