@Override public void layoutContainer( Container parent ){ Rectangle bounds = window.getWindowBounds(); Dimension size = windowComponent.getPreferredSize(); if( bounds.width != size.width || bounds.height != size.height ){ window.setWindowBounds( new Rectangle( bounds.getLocation(), size ) ); } super.layoutContainer( parent ); } }
@Override public void layoutContainer( Container parent ){ Rectangle bounds = window.getWindowBounds(); Dimension size = windowComponent.getPreferredSize(); if( bounds.width != size.width || bounds.height != size.height ){ window.setWindowBounds( new Rectangle( bounds.getLocation(), size ) ); } super.layoutContainer( parent ); } }
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 ); } } } }
private void move() { DockUtilities.checkLayoutLocked(); if( combine != null ){ combine( dropInfo, combiner, null ); } else{ ScreenDockWindow window = getWindow( dockable ); Point zero = window.getOffsetMove(); if( zero == null ) zero = new Point( 0, 0 ); Rectangle bounds = window.getWindowBounds(); bounds = new Rectangle( titleX - zero.x, titleY - zero.y, bounds.width, bounds.height ); window.setWindowBounds( bounds ); } }
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 boolean beginVisit( Node node, boolean revisit ){ if( revisit ){ return false; } ScreenDockWindow window = node.getWindow(); if( window != request.getWindow() ){ Rectangle bounds = request.getInitialBounds( window ); bounds.x += dx; bounds.y += dy; window.setWindowBounds( bounds ); } return true; }
public boolean beginVisit( Node node, boolean revisit ){ if( revisit ){ return false; } ScreenDockWindow window = node.getWindow(); if( window != request.getWindow() ){ Rectangle bounds = request.getInitialBounds( window ); bounds.x += dx; bounds.y += dy; window.setWindowBounds( bounds ); } return true; }
public void run() { ScreenDockWindow window = station.getWindow( parent ); if( window != null ){ window.validate(); Dimension newSize = dockable.getComponent().getSize(); int dw = oldSize.width - newSize.width; int dh = oldSize.height - newSize.height; Rectangle bounds = window.getWindowBounds(); bounds.width += dw; bounds.height += dh; window.setWindowBounds( bounds ); } } } );
public void run() { ScreenDockWindow window = station.getWindow( parent ); if( window != null ){ window.validate(); Dimension newSize = dockable.getComponent().getSize(); int dw = oldSize.width - newSize.width; int dh = oldSize.height - newSize.height; Rectangle bounds = window.getWindowBounds(); bounds.width += dw; bounds.height += dh; window.setWindowBounds( bounds ); } } } );
public void move( Dockable dockable, DockableProperty property ) { DockUtilities.checkLayoutLocked(); if( property instanceof ScreenDockProperty ){ ScreenDockWindow window = getWindow( dockable ); if( window == null ) throw new IllegalArgumentException( "dockable not child of this station" ); ScreenDockProperty bounds = (ScreenDockProperty)property; window.setWindowBounds( new Rectangle( bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight() ) ); } }
window.setWindowBounds( bounds );
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 ) ); } } }
window.setWindowBounds( bounds ); window.validate(); Rectangle windowBounds = window.getWindowBounds(); windowBounds = new Rectangle( windowBounds.x + offset.x, windowBounds.y + offset.y, windowBounds.width, windowBounds.height ); window.setWindowBounds( windowBounds );
window.setNormalBounds(bounds); } else{ window.setWindowBounds(bounds);
window.setFullscreenStrategy( getFullscreenStrategy() ); window.setDockable( dockable ); window.setWindowBounds( new Rectangle( x, y, width, height ) ); window.setVisible( isShowing() ); window.validate();
newWindow.setWindowBounds( bounds ); newWindow.setFullscreen( fullscreen );
node.getWindow().setWindowBounds( initial );
node.getWindow().setWindowBounds( initial );