private void addBorder( Area area ){ ScreenDockWindow window = getCallback().getWindow(); Insets insets = window.getDockableInsets(); Dimension size = window.getWindowBounds().getSize(); if( insets.top > 0 ){ area.add( new Area( new Rectangle( 0, 0, size.width, insets.top ))); } if( insets.bottom > 0 ){ area.add( new Area( new Rectangle( 0, size.height - insets.bottom - 1, size.width, insets.bottom ))); } if( insets.left > 0 ){ area.add( new Area( new Rectangle( 0, 0, insets.left, size.height ))); } if( insets.right > 0 ){ area.add( new Area( new Rectangle( size.width - insets.right - 1, 0, insets.right, size.height ))); } }
private void addExpanded( Area area ){ Rectangle dropGap = station.getDropGapBoundaries(); if( dropGap != null ){ ScreenDockWindow window = getCallback().getWindow(); Insets insets = window.getDockableInsets(); dropGap.x += insets.left; dropGap.y += insets.top; area.add( new Area( dropGap ) ); } }
private void addChildren( Area area ){ ScreenDockWindow window = getCallback().getWindow(); Insets insets = window.getDockableInsets();
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 ) ); } } }
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 ) ); } } }
final Insets insets = window.getDockableInsets();
if( !boundsIncludeWindow ){ window.validate(); Insets estimate = window.getDockableInsets(); if( estimate != null ){ bounds.x -= estimate.left;