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

Print this page

        

*** 49,58 **** --- 49,60 ---- private native long nativeCreateNSWindow(long nsViewPtr,long ownerPtr, long styleBits, double x, double y, double w, double h); private static native void nativeSetNSWindowStyleBits(long nsWindowPtr, int mask, int data); private static native void nativeSetNSWindowMenuBar(long nsWindowPtr, long menuBarPtr); private static native Insets nativeGetNSWindowInsets(long nsWindowPtr); private static native void nativeSetNSWindowBounds(long nsWindowPtr, double x, double y, double w, double h); + private static native void nativeSetNSWindowStandardFrame(long nsWindowPtr, + double x, double y, double w, double h); private static native void nativeSetNSWindowMinMax(long nsWindowPtr, double minW, double minH, double maxW, double maxH); private static native void nativePushNSWindowToBack(long nsWindowPtr); private static native void nativePushNSWindowToFront(long nsWindowPtr); private static native void nativeSetNSWindowTitle(long nsWindowPtr, String title); private static native void nativeRevalidateNSWindowShadow(long nsWindowPtr);
*** 472,481 **** --- 474,487 ---- @Override // PlatformWindow public void setBounds(int x, int y, int w, int h) { nativeSetNSWindowBounds(getNSWindowPtr(), x, y, w, h); } + public void setMaximizedBounds(int x, int y, int w, int h) { + nativeSetNSWindowStandardFrame(getNSWindowPtr(), x, y, w, h); + } + private boolean isMaximized() { return undecorated ? this.normalBounds != null : CWrapper.NSWindow.isZoomed(getNSWindowPtr()); }
*** 981,999 **** peer.notifyZoom(isZoomed); } } private void checkZoom() { ! if (target instanceof Frame && isVisible()) { ! Frame targetFrame = (Frame)target; ! if (targetFrame.getExtendedState() != Frame.MAXIMIZED_BOTH && isMaximized()) { deliverZoom(true); ! } else if (targetFrame.getExtendedState() == Frame.MAXIMIZED_BOTH && !isMaximized()) { deliverZoom(false); } } - } private void deliverNCMouseDown() { if (peer != null) { peer.notifyNCMouseDown(); } --- 987,1003 ---- peer.notifyZoom(isZoomed); } } private void checkZoom() { ! int state = peer.getState(); ! if (state != Frame.MAXIMIZED_BOTH && isMaximized()) { deliverZoom(true); ! } else if (state == Frame.MAXIMIZED_BOTH && !isMaximized()) { deliverZoom(false); } } private void deliverNCMouseDown() { if (peer != null) { peer.notifyNCMouseDown(); }