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

Print this page




 402                         currentTG = parentTG;
 403                         parentTG = currentTG.getParent();
 404                     }
 405                     Thread thread = new Thread(currentTG, XToolkit.this, "AWT-XAWT");
 406                     thread.setPriority(Thread.NORM_PRIORITY + 1);
 407                     thread.setDaemon(true);
 408                     return thread;
 409                 }
 410             };
 411             toolkitThread = AccessController.doPrivileged(action);
 412             toolkitThread.start();
 413         }
 414     }
 415 
 416     public ButtonPeer createButton(Button target) {
 417         ButtonPeer peer = new XButtonPeer(target);
 418         targetCreatedPeer(target, peer);
 419         return peer;
 420     }
 421 




 422     public FramePeer createFrame(Frame target) {
 423         FramePeer peer = new XFramePeer(target);
 424         targetCreatedPeer(target, peer);
 425         return peer;
 426     }
 427 
 428     static void addToWinMap(long window, XBaseWindow xwin)
 429     {
 430         synchronized(winMap) {
 431             winMap.put(Long.valueOf(window),xwin);
 432         }
 433     }
 434 
 435     static void removeFromWinMap(long window, XBaseWindow xwin) {
 436         synchronized(winMap) {
 437             winMap.remove(Long.valueOf(window));
 438         }
 439     }
 440     static XBaseWindow windowToXWindow(long window) {
 441         synchronized(winMap) {




 402                         currentTG = parentTG;
 403                         parentTG = currentTG.getParent();
 404                     }
 405                     Thread thread = new Thread(currentTG, XToolkit.this, "AWT-XAWT");
 406                     thread.setPriority(Thread.NORM_PRIORITY + 1);
 407                     thread.setDaemon(true);
 408                     return thread;
 409                 }
 410             };
 411             toolkitThread = AccessController.doPrivileged(action);
 412             toolkitThread.start();
 413         }
 414     }
 415 
 416     public ButtonPeer createButton(Button target) {
 417         ButtonPeer peer = new XButtonPeer(target);
 418         targetCreatedPeer(target, peer);
 419         return peer;
 420     }
 421 
 422     public FramePeer createLightweightFrame(LightweightFrame target) {
 423         return null;
 424     }
 425 
 426     public FramePeer createFrame(Frame target) {
 427         FramePeer peer = new XFramePeer(target);
 428         targetCreatedPeer(target, peer);
 429         return peer;
 430     }
 431 
 432     static void addToWinMap(long window, XBaseWindow xwin)
 433     {
 434         synchronized(winMap) {
 435             winMap.put(Long.valueOf(window),xwin);
 436         }
 437     }
 438 
 439     static void removeFromWinMap(long window, XBaseWindow xwin) {
 440         synchronized(winMap) {
 441             winMap.remove(Long.valueOf(window));
 442         }
 443     }
 444     static XBaseWindow windowToXWindow(long window) {
 445         synchronized(winMap) {