@Override protected void valueChanged( ScreenDockFullscreenStrategy oldValue, ScreenDockFullscreenStrategy newValue ) { List<ScreenDockWindow> fullscreenWindows = new ArrayList<ScreenDockWindow>(); for( ScreenDockWindowHandle handle : dockables.dockables() ){ ScreenDockWindow window = handle.getWindow(); if( window.isFullscreen() ){ fullscreenWindows.add( window ); window.setFullscreen( false ); } } if( oldValue != null ){ oldValue.uninstall( ScreenDockStation.this ); } if( newValue != null ){ newValue.install( ScreenDockStation.this ); } for( ScreenDockWindowHandle window : dockables.dockables() ){ window.getWindow().setFullscreenStrategy( newValue ); } for( ScreenDockWindow window : fullscreenWindows ){ window.setFullscreen( true ); } } };
ScreenDockWindowHandle handle = new ScreenDockWindowHandle( dockable, window, configuration ); window.setController( getController() ); window.setFullscreenStrategy( getFullscreenStrategy() ); window.setDockable( dockable ); window.setWindowBounds( new Rectangle( x, y, width, height ) );
window.setFullscreenStrategy( getFullscreenStrategy() );
/** * Invoked when a {@link ScreenDockWindow} is no longer needed. This * method removes some listeners from the window. If overridden * by a subclass, the subclass should ensure that this implementation * is invoked too. * @param dockable the element for which <code>window</code> was used * @param window the old window */ protected void deregister( Dockable dockable, ScreenDockWindow window ){ if( frontWindow == window ) frontWindow = null; int index = indexOf( window.getDockable() ); saveLocation( index ); dockables.remove( index ); getRootHandler().removeRoot( window.getComponent() ); window.setDockable( null ); window.setPaintCombining( null ); window.setController( null ); window.setFullscreenStrategy( null ); for( ScreenDockStationListener listener : screenDockStationListeners() ){ listener.windowDeregistering( this, dockable, window ); } window.destroy(); }
oldWindow.setPaintCombining( null ); oldWindow.setController( null ); oldWindow.setFullscreenStrategy( null ); newWindow.setFullscreenStrategy( getFullscreenStrategy() ); newWindow.setWindowBounds( bounds ); newWindow.setFullscreen( fullscreen );