< prev index next >

src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java

Print this page

        

*** 376,386 **** if (this.undecorated) styleBits = SET(styleBits, DECORATED, false); } // Either java.awt.Frame or java.awt.Dialog can be resizable, however java.awt.Window is never resizable { ! final boolean resizable = isTargetResizable() && isNativelyFocusableWindow(); styleBits = SET(styleBits, RESIZABLE, resizable); if (!resizable) { styleBits = SET(styleBits, ZOOMABLE, false); } } --- 376,386 ---- if (this.undecorated) styleBits = SET(styleBits, DECORATED, false); } // Either java.awt.Frame or java.awt.Dialog can be resizable, however java.awt.Window is never resizable { ! final boolean resizable = isFrame ? ((Frame)target).isResizable() : (isDialog ? ((Dialog)target).isResizable() : false); styleBits = SET(styleBits, RESIZABLE, resizable); if (!resizable) { styleBits = SET(styleBits, ZOOMABLE, false); } }
*** 480,499 **** peer.setTextured(IS(TEXTURED, styleBits)); return styleBits; } - private boolean isTargetResizable() { - if (target instanceof Frame) { - return ((Frame)target).isResizable(); - } else if (target instanceof Dialog) { - return ((Dialog)target).isResizable(); - } - - return false; - } - // this is the counter-point to -[CWindow _nativeSetStyleBit:] private void setStyleBits(final int mask, final boolean value) { execute(ptr -> nativeSetNSWindowStyleBits(ptr, mask, value ? mask : 0)); } --- 480,489 ----
*** 684,696 **** this.visible = visible; // Manage the extended state when showing if (visible) { /* Frame or Dialog should be set property WINDOW_FULLSCREENABLE to true if the ! Frame or Dialog is resizable and focusable. **/ ! final boolean resizable = isTargetResizable() && isNativelyFocusableWindow(); if (resizable) { setCanFullscreen(true); } // Apply the extended state as expected in shared code --- 674,687 ---- this.visible = visible; // Manage the extended state when showing if (visible) { /* Frame or Dialog should be set property WINDOW_FULLSCREENABLE to true if the ! Frame or Dialog is resizable. **/ ! final boolean resizable = (target instanceof Frame) ? ((Frame)target).isResizable() : ! ((target instanceof Dialog) ? ((Dialog)target).isResizable() : false); if (resizable) { setCanFullscreen(true); } // Apply the extended state as expected in shared code
*** 821,834 **** } } @Override public void setResizable(final boolean resizable) { ! final boolean windowResizable = resizable && isNativelyFocusableWindow(); ! setCanFullscreen(windowResizable); ! setStyleBits(RESIZABLE, windowResizable); ! setStyleBits(ZOOMABLE, windowResizable); } @Override public void setSizeConstraints(int minW, int minH, int maxW, int maxH) { execute(ptr -> nativeSetNSWindowMinMax(ptr, minW, minH, maxW, maxH)); --- 812,824 ---- } } @Override public void setResizable(final boolean resizable) { ! setCanFullscreen(resizable); ! setStyleBits(RESIZABLE, resizable); ! setStyleBits(ZOOMABLE, resizable); } @Override public void setSizeConstraints(int minW, int minH, int maxW, int maxH) { execute(ptr -> nativeSetNSWindowMinMax(ptr, minW, minH, maxW, maxH));
*** 866,877 **** return ref.get(); } @Override public void updateFocusableWindowState() { ! setStyleBits(SHOULD_BECOME_KEY | SHOULD_BECOME_MAIN | RESIZABLE, ! (isNativelyFocusableWindow() && isTargetResizable())); } @Override public void setAlwaysOnTop(boolean isAlwaysOnTop) { setStyleBits(ALWAYS_ON_TOP, isAlwaysOnTop); --- 856,867 ---- return ref.get(); } @Override public void updateFocusableWindowState() { ! final boolean isFocusable = isNativelyFocusableWindow(); ! setStyleBits(SHOULD_BECOME_KEY | SHOULD_BECOME_MAIN, isFocusable); // set both bits at once } @Override public void setAlwaysOnTop(boolean isAlwaysOnTop) { setStyleBits(ALWAYS_ON_TOP, isAlwaysOnTop);
< prev index next >