@Override public ScreenPerspectiveWindow convert( ConvertedPlaceholderListItem item ){ if( children == null ){ return null; } int id = item.getInt( "id" ); PerspectiveDockable dockable = children.get( id ); if( dockable != null ){ ScreenPerspectiveWindow child = new ScreenPerspectiveWindow( dockable ); dockable.setParent( ScreenDockPerspective.this ); child.setX( item.getInt( "x" ) ); child.setY( item.getInt( "y" ) ); child.setWidth( item.getInt( "width" ) ); child.setHeight( item.getInt( "height" ) ); child.setFullscreen( item.getBoolean( "fullscreen" ) ); return child; } return null; } });
@Override public ScreenPerspectiveWindow convert( ConvertedPlaceholderListItem item ){ if( children == null ){ return null; } int id = item.getInt( "id" ); PerspectiveDockable dockable = children.get( id ); if( dockable != null ){ ScreenPerspectiveWindow child = new ScreenPerspectiveWindow( dockable ); dockable.setParent( ScreenDockPerspective.this ); child.setX( item.getInt( "x" ) ); child.setY( item.getInt( "y" ) ); child.setWidth( item.getInt( "width" ) ); child.setHeight( item.getInt( "height" ) ); child.setFullscreen( item.getBoolean( "fullscreen" ) ); return child; } return null; } });
/** * Adds <code>dockable</code> at location <code>x/y</code> with size <code>width/height</code> to * this perspective. * @param dockable the element to add, not <code>null</code> * @param x the x-coordinate on the screen * @param y the y-coordinate on the screen * @param width the width of the window * @param height the height of the window * @param fullscreen whether <code>dockable</code> should be extended to fullscreen mode */ public void add( PerspectiveDockable dockable, int x, int y, int width, int height, boolean fullscreen ){ DockUtilities.ensureTreeValidity( this, dockable ); ScreenPerspectiveWindow child = new ScreenPerspectiveWindow( dockable ); dockable.setParent( this ); child.setX( x ); child.setY( y ); child.setWidth( width ); child.setHeight( height ); child.setFullscreen( fullscreen ); dockables.dockables().add( child ); }
/** * Adds <code>dockable</code> at location <code>x/y</code> with size <code>width/height</code> to * this perspective. * @param dockable the element to add, not <code>null</code> * @param x the x-coordinate on the screen * @param y the y-coordinate on the screen * @param width the width of the window * @param height the height of the window * @param fullscreen whether <code>dockable</code> should be extended to fullscreen mode */ public void add( PerspectiveDockable dockable, int x, int y, int width, int height, boolean fullscreen ){ DockUtilities.ensureTreeValidity( this, dockable ); ScreenPerspectiveWindow child = new ScreenPerspectiveWindow( dockable ); dockable.setParent( this ); child.setX( x ); child.setY( y ); child.setWidth( width ); child.setHeight( height ); child.setFullscreen( fullscreen ); dockables.dockables().add( child ); }
/** * Adds a placeholder for <code>dockable</code> and all its children to this * station. * @param dockable the element whose placeholder should be inserted * @param x the x-coordinate on the screen * @param y the y-coordinate on the screen * @param width the width of the window * @param height the height of the window */ public void addPlaceholder( PerspectiveDockable dockable, int x, int y, int width, int height ){ ScreenPerspectiveWindow child = new ScreenPerspectiveWindow( dockable ); child.setX( x ); child.setY( y ); child.setWidth( width ); child.setHeight( height ); child.setFullscreen( false ); dockables.dockables().add( child ); remove( dockable ); }
/** * Adds a placeholder for <code>dockable</code> and all its children to this * station. * @param dockable the element whose placeholder should be inserted * @param x the x-coordinate on the screen * @param y the y-coordinate on the screen * @param width the width of the window * @param height the height of the window */ public void addPlaceholder( PerspectiveDockable dockable, int x, int y, int width, int height ){ ScreenPerspectiveWindow child = new ScreenPerspectiveWindow( dockable ); child.setX( x ); child.setY( y ); child.setWidth( width ); child.setHeight( height ); child.setFullscreen( false ); dockables.dockables().add( child ); remove( dockable ); }