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

Print this page




  70             }
  71             finally {
  72                 XToolkit.awtUnlock();
  73             }
  74         } else {
  75             XToolkit.awtLock();
  76             try {
  77                 XlibWrapper.XMapWindow(XToolkit.getDisplay(), handle);
  78             }
  79             finally {
  80                 XToolkit.awtUnlock();
  81             }
  82         }
  83     }
  84     public void setEnabled(boolean b) {}
  85     public void paint(Graphics g) {}
  86     public void repaint(long tm, int x, int y, int width, int height) {}
  87     public void print(Graphics g) {}
  88     public void setBounds(int x, int y, int width, int height, int op) {
  89         // Unimplemeneted: Check for min/max hints for non-resizable








  90         XToolkit.awtLock();
  91         try {
  92             XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), handle, x, y, width, height);
  93         }
  94         finally {
  95             XToolkit.awtUnlock();
  96         }
  97     }
  98     public void handleEvent(AWTEvent e) {
  99         switch (e.getID()) {
 100           case FocusEvent.FOCUS_GAINED:
 101               XKeyboardFocusManagerPeer.setCurrentNativeFocusOwner(proxy);
 102               container.focusGained(handle);
 103               break;
 104           case FocusEvent.FOCUS_LOST:
 105               XKeyboardFocusManagerPeer.setCurrentNativeFocusOwner(null);
 106               container.focusLost(handle);
 107               break;
 108           case KeyEvent.KEY_PRESSED:
 109           case KeyEvent.KEY_RELEASED:




  70             }
  71             finally {
  72                 XToolkit.awtUnlock();
  73             }
  74         } else {
  75             XToolkit.awtLock();
  76             try {
  77                 XlibWrapper.XMapWindow(XToolkit.getDisplay(), handle);
  78             }
  79             finally {
  80                 XToolkit.awtUnlock();
  81             }
  82         }
  83     }
  84     public void setEnabled(boolean b) {}
  85     public void paint(Graphics g) {}
  86     public void repaint(long tm, int x, int y, int width, int height) {}
  87     public void print(Graphics g) {}
  88     public void setBounds(int x, int y, int width, int height, int op) {
  89         // Unimplemeneted: Check for min/max hints for non-resizable
  90 
  91         /* X does not allow setting heights or widths to 0: this will cause a BadValue
  92          * error. Lets set them to something close enough */
  93         if (width <= 0)
  94             width = 1;
  95         if (height <= 0)
  96             height = 1;
  97 
  98         XToolkit.awtLock();
  99         try {
 100             XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), handle, x, y, width, height);
 101         }
 102         finally {
 103             XToolkit.awtUnlock();
 104         }
 105     }
 106     public void handleEvent(AWTEvent e) {
 107         switch (e.getID()) {
 108           case FocusEvent.FOCUS_GAINED:
 109               XKeyboardFocusManagerPeer.setCurrentNativeFocusOwner(proxy);
 110               container.focusGained(handle);
 111               break;
 112           case FocusEvent.FOCUS_LOST:
 113               XKeyboardFocusManagerPeer.setCurrentNativeFocusOwner(null);
 114               container.focusLost(handle);
 115               break;
 116           case KeyEvent.KEY_PRESSED:
 117           case KeyEvent.KEY_RELEASED: