private Rectangle validate( ScreenDockWindow window, Rectangle target ){ Dimension max = getMaximumSize( window ); if( target == null ){ target = window.getWindowBounds(); } return new Rectangle( target.x, target.y, Math.min( max.width, target.width ), Math.min( max.height, target.height ) ); }
private Rectangle validate( ScreenDockWindow window, Rectangle target ){ Dimension max = getMaximumSize( window ); if( target == null ){ target = window.getWindowBounds(); } return new Rectangle( target.x, target.y, Math.min( max.width, target.width ), Math.min( max.height, target.height ) ); }