this.station = station;
}
public void handleResizeRequest( CControl control ) {
for( int i = 0, n = station.getDockableCount(); i<n; i++ ){
ScreenDockWindow window = station.getWindow( i );
RequestDimension size = getAndClearResizeRequest( station.getDockable( i ) );
if( size != null ){
Insets insets = window.getDockableInsets();
Rectangle bounds = window.getWindowBounds();
int width;
if( size.isWidthSet() )
width = size.getWidth() + insets.left + insets.right;
else
width = bounds.width;
int height;
if( size.isHeightSet() )
height = size.getHeight() + insets.top + insets.bottom;
else
height = bounds.height;
window.setWindowBounds(
new Rectangle(
bounds.x + (bounds.width - width)/2,
bounds.y + (bounds.height - height)/2,
width,
height ) );