src/windows/classes/sun/awt/windows/WWindowPeer.java

Print this page




 185 
 186         float opacity = ((Window)target).getOpacity();
 187         if (opacity < 1.0f) {
 188             setOpacity(opacity);
 189         }
 190 
 191         synchronized (getStateLock()) {
 192             // default value of a boolean field is 'false', so set isOpaque to
 193             // true here explicitly
 194             this.isOpaque = true;
 195             setOpaque(((Window)target).isOpaque());
 196         }
 197     }
 198 
 199     native void createAwtWindow(WComponentPeer parent);
 200 
 201     private volatile Window.Type windowType = Window.Type.NORMAL;
 202 
 203     // This method must be called for Window, Dialog, and Frame before creating
 204     // the hwnd
 205     void preCreate(WComponentPeer parent) {
 206         windowType = ((Window)target).getType();
 207     }
 208 
 209     void create(WComponentPeer parent) {
 210         preCreate(parent);
 211         createAwtWindow(parent);






 212     }
 213 
 214     // should be overriden in WDialogPeer
 215     protected void realShow() {
 216         super.show();
 217     }
 218 
 219     public void show() {
 220         updateFocusableWindowState();
 221 
 222         boolean alwaysOnTop = ((Window)target).isAlwaysOnTop();
 223 
 224         // Fix for 4868278.
 225         // If we create a window with a specific GraphicsConfig, and then move it with
 226         // setLocation() or setBounds() to another one before its peer has been created,
 227         // then calling Window.getGraphicsConfig() returns wrong config. That may lead
 228         // to some problems like wrong-placed tooltips. It is caused by calling
 229         // super.displayChanged() in WWindowPeer.displayChanged() regardless of whether
 230         // GraphicsDevice was really changed, or not. So we need to track it here.
 231         updateGC();




 185 
 186         float opacity = ((Window)target).getOpacity();
 187         if (opacity < 1.0f) {
 188             setOpacity(opacity);
 189         }
 190 
 191         synchronized (getStateLock()) {
 192             // default value of a boolean field is 'false', so set isOpaque to
 193             // true here explicitly
 194             this.isOpaque = true;
 195             setOpaque(((Window)target).isOpaque());
 196         }
 197     }
 198 
 199     native void createAwtWindow(WComponentPeer parent);
 200 
 201     private volatile Window.Type windowType = Window.Type.NORMAL;
 202 
 203     // This method must be called for Window, Dialog, and Frame before creating
 204     // the hwnd
 205     final void preCreate() {
 206         windowType = ((Window)target).getType();
 207     }
 208 
 209     void create(WComponentPeer parent) {
 210         preCreate();
 211         createAwtWindow(parent);
 212     }
 213 
 214     @Override
 215     final WComponentPeer getNativeParent() {
 216         final Container parent = ((Window) target).getOwner();
 217         return (WComponentPeer) WToolkit.targetToPeer(parent);
 218     }
 219 
 220     // should be overriden in WDialogPeer
 221     protected void realShow() {
 222         super.show();
 223     }
 224 
 225     public void show() {
 226         updateFocusableWindowState();
 227 
 228         boolean alwaysOnTop = ((Window)target).isAlwaysOnTop();
 229 
 230         // Fix for 4868278.
 231         // If we create a window with a specific GraphicsConfig, and then move it with
 232         // setLocation() or setBounds() to another one before its peer has been created,
 233         // then calling Window.getGraphicsConfig() returns wrong config. That may lead
 234         // to some problems like wrong-placed tooltips. It is caused by calling
 235         // super.displayChanged() in WWindowPeer.displayChanged() regardless of whether
 236         // GraphicsDevice was really changed, or not. So we need to track it here.
 237         updateGC();