public void setFullscreen( ScreenDockWindow window, boolean fullscreen ){ if( fullscreen ){ window.setNormalBounds( window.getWindowBounds() ); window.setWindowBounds( new Rectangle( 0, 0, desktop.getWidth(), desktop.getHeight() ) ); } else{ Rectangle bounds = window.getNormalBounds(); if( bounds != null ){ window.setWindowBounds( bounds ); window.setNormalBounds( null ); } } } }
public void setFullscreen( ScreenDockWindow window, boolean fullscreen ){ if( fullscreen ){ window.setNormalBounds( window.getWindowBounds() ); window.setWindowBounds( new Rectangle( 0, 0, desktop.getWidth(), desktop.getHeight() ) ); } else{ Rectangle bounds = window.getNormalBounds(); if( bounds != null ){ window.setWindowBounds( bounds ); window.setNormalBounds( null ); } } } }
/** * Sets the fullscreen mode of <code>window</code>. * @param wrapper the wrapper around <code>window</code> * @param window the window whose state is to be changed * @param fullscreen the new state */ public void setFullscreen( ScreenDockWindow wrapper, Window window, boolean fullscreen ){ if( isFullscreen( wrapper, window ) != fullscreen ){ if( fullscreen ){ Rectangle bounds = findBestFullscreenBounds( window ); if( bounds != null ){ wrapper.setNormalBounds( wrapper.getWindowBounds() ); window.setBounds( bounds.x-1, bounds.y-1, bounds.width+2, bounds.height+2 ); } } else{ Rectangle bounds = wrapper.getNormalBounds(); if( bounds != null ){ window.setBounds( bounds ); wrapper.setNormalBounds( null ); } } } }
window.setNormalBounds(bounds); } else{ window.setWindowBounds(bounds);