if( maximized ){
if( parent == station ){
station.setFullscreen( dockable, true );
}
else{
Dockable child = DockUtilities.getDirectChild( station, dockable );
if( child == null ){
throw new IllegalArgumentException( "dockable not a child of this station" );
}
if( !parent.canDrag( dockable )){
throw new IllegalArgumentException( "cannot drag dockable from its parent" );
}
parent.drag( dockable );
if( !station.drop( dockable, child ) ){
throw new IllegalStateException( "cannot drop dockable on this station" );
}
station.setFullscreen( dockable, true );
}
}
else{
if( parent == station ){
station.setFullscreen( dockable, false );
}
else{
Dockable child = DockUtilities.getDirectChild( station, dockable );
ScreenDockProperty location = station.getLocation( child, dockable );
if( !parent.canDrag( dockable )){
throw new IllegalArgumentException( "cannot drag dockable from its current parent" );
}