public DockableProperty getDockableProperty( PerspectiveDockable child, PerspectiveDockable target ){ ScreenPerspectiveWindow window = getWindow( child ); if( window == null ){ throw new IllegalArgumentException( "child is not a child of this station" ); } Path placeholder = null; if( target != null ){ placeholder = target.getPlaceholder(); } else{ placeholder = child.getPlaceholder(); } return new ScreenDockProperty( window.getX(), window.getY(), window.getWidth(), window.getHeight(), placeholder, window.isFullscreen() ); }
public DockableProperty getDockableProperty( PerspectiveDockable child, PerspectiveDockable target ){ ScreenPerspectiveWindow window = getWindow( child ); if( window == null ){ throw new IllegalArgumentException( "child is not a child of this station" ); } Path placeholder = null; if( target != null ){ placeholder = target.getPlaceholder(); } else{ placeholder = child.getPlaceholder(); } return new ScreenDockProperty( window.getX(), window.getY(), window.getWidth(), window.getHeight(), placeholder, window.isFullscreen() ); }
@Override public ConvertedPlaceholderListItem convert( int index, ScreenPerspectiveWindow child ) { if( children == null ){ return null; } ConvertedPlaceholderListItem item = new ConvertedPlaceholderListItem(); item.putInt( "id", children.get( child.asDockable() ) ); item.putInt( "x", child.getX() ); item.putInt( "y", child.getY() ); item.putInt( "width", child.getWidth() ); item.putInt( "height", child.getHeight() ); item.putBoolean( "fullscreen", child.isFullscreen() ); Path placeholder = child.asDockable().getPlaceholder(); if( placeholder != null ){ item.putString( "placeholder", placeholder.toString() ); item.setPlaceholder( placeholder ); } return item; } });
@Override public ConvertedPlaceholderListItem convert( int index, ScreenPerspectiveWindow child ) { if( children == null ){ return null; } ConvertedPlaceholderListItem item = new ConvertedPlaceholderListItem(); item.putInt( "id", children.get( child.asDockable() ) ); item.putInt( "x", child.getX() ); item.putInt( "y", child.getY() ); item.putInt( "width", child.getWidth() ); item.putInt( "height", child.getHeight() ); item.putBoolean( "fullscreen", child.isFullscreen() ); Path placeholder = child.asDockable().getPlaceholder(); if( placeholder != null ){ item.putString( "placeholder", placeholder.toString() ); item.setPlaceholder( placeholder ); } return item; } });
/** * Removes the <code>index</code>'th element of this station. * @param index the index of the element to remove * @return the removed element */ public PerspectiveDockable remove( int index ){ PlaceholderMetaMap map = dockables.dockables().getMetaMap( index ); ScreenPerspectiveWindow child = dockables.dockables().get( index ); map.putInt( "x", child.getX() ); map.putInt( "y", child.getY() ); map.putInt( "width", child.getWidth() ); map.putInt( "height", child.getHeight() ); dockables.remove( child ); child.dockable.setParent( null ); return child.dockable; }
/** * Removes the <code>index</code>'th element of this station. * @param index the index of the element to remove * @return the removed element */ public PerspectiveDockable remove( int index ){ PlaceholderMetaMap map = dockables.dockables().getMetaMap( index ); ScreenPerspectiveWindow child = dockables.dockables().get( index ); map.putInt( "x", child.getX() ); map.putInt( "y", child.getY() ); map.putInt( "width", child.getWidth() ); map.putInt( "height", child.getHeight() ); dockables.remove( child ); child.dockable.setParent( null ); return child.dockable; }