src/macosx/classes/sun/lwawt/LWWindowPeer.java
Print this page
@@ -534,11 +534,20 @@
return windowState;
}
@Override
public void setMaximizedBounds(Rectangle bounds) {
- // TODO: not implemented
+ if (bounds == null) {
+ platformWindow.setMaximizedBounds(-1, -1, -1, -1);
+ } else {
+ platformWindow.setMaximizedBounds(
+ bounds.x == Integer.MAX_VALUE ? -1 : bounds.x,
+ bounds.y == Integer.MAX_VALUE ? -1 : bounds.y,
+ bounds.width == Integer.MAX_VALUE ? -1 : bounds.width,
+ bounds.height == Integer.MAX_VALUE ? -1 : bounds.height
+ );
+ }
}
@Override
public void setBoundsPrivate(int x, int y, int width, int height) {
setBounds(x, y, width, height, SET_BOUNDS | NO_EMBEDDED_CHECK);