@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; } });
/** * Gets the index of <code>dockable</code>. * @param dockable some child of this station * @return the index or -1 if <code>dockable</code> was not found */ public int indexOf( PerspectiveDockable dockable ){ int count = 0; for( ScreenPerspectiveWindow child : dockables.dockables() ){ if( child.asDockable() == dockable ){ return count; } count++; } return -1; }
/** * Gets the index of <code>dockable</code>. * @param dockable some child of this station * @return the index or -1 if <code>dockable</code> was not found */ public int indexOf( PerspectiveDockable dockable ){ int count = 0; for( ScreenPerspectiveWindow child : dockables.dockables() ){ if( child.asDockable() == dockable ){ return count; } count++; } return -1; }
public PerspectiveDockable getDockable( int index ){ return dockables.dockables().get( index ).asDockable(); }
public PerspectiveDockable getDockable( int index ){ return dockables.dockables().get( index ).asDockable(); }
/** * Gets access to the window that shows <code>dockable</code> * @param dockable the element whose window is requested * @return the window or <code>null</code> if <code>dockable</code> was not found */ public ScreenPerspectiveWindow getWindow( PerspectiveDockable dockable ){ for( ScreenPerspectiveWindow child : dockables.dockables() ){ if( child.asDockable() == dockable ){ return child; } } return null; }
/** * Gets access to the window that shows <code>dockable</code> * @param dockable the element whose window is requested * @return the window or <code>null</code> if <code>dockable</code> was not found */ public ScreenPerspectiveWindow getWindow( PerspectiveDockable dockable ){ for( ScreenPerspectiveWindow child : dockables.dockables() ){ if( child.asDockable() == dockable ){ return child; } } return null; }