private void calculateCollectionPartDescriptions ( ) { collectionPartIds = new CollectionPartDescription [ this . getNrofParts ( ) ] ; int displayOffset = 0 ; int count = 0 ; for ( count = 0 ; count < getNrofParts ( ) - 1 ; count ++ ) { displayOffset = count * maxPartSize ; if ( displayOffset != offset ) { collectionPartIds [ count ] = new CollectionPartDescription ( displayOffset , maxPartSize , false ) ; } else { collectionPartIds [ count ] = new CollectionPartDescription ( displayOffset , maxPartSize , true ) ; currentCollectionPartIdIndex = count ; } } displayOffset = count * maxPartSize ; if ( displayOffset != offset ) { collectionPartIds [ count ] = new CollectionPartDescription ( displayOffset , getLastPartSize ( ) , false ) ; } else { collectionPartIds [ count ] = new CollectionPartDescription ( displayOffset , getLastPartSize ( ) , true ) ; currentCollectionPartIdIndex = count ; } }
Calculates offsets and sizes of all collection parts the complete collection is divided in .