public void clear() { this.validatedTrailingSize.clear(); this.validateSize = 0; }
/** * Adds the given int value to the list. * * @param value * the new value to be added. */ public void add( final long value ) { ensureCapacity( size ); data[size] = value; size += 1; }
public void updateValidatedSize( final int rowSpan, final long leading, final long trailing ) { final int idx = rowSpan - 1; if ( validatedLeadingSize < leading ) { validatedLeadingSize = leading; } if ( ( idx >= validatedTrailingSize.size() ) || ( validatedTrailingSize.get( idx ) < trailing ) ) { validatedTrailingSize.set( idx, trailing ); } }
private void updateBreaks() { final long[] horizontalBreaks = pageGrid.getHorizontalBreaks(); final int breakCount = horizontalBreaks.length; if ( pageLongList == null ) { pageLongList = new LongList( breakCount ); } else { pageLongList.clear(); } for ( int i = 0; i < breakCount; i++ ) { final long pos = horizontalBreaks[i]; if ( pos <= startOfLine ) { // skip .. continue; } if ( pos >= endOfLine ) { break; } if ( overflowX == false || ( i < ( breakCount - 1 ) ) ) { pageLongList.add( pos ); } } pageLongList.add( endOfLine ); this.pagebreaks = pageLongList.toArray( this.pagebreaks ); this.pagebreakCount = pageLongList.size(); }
private void updateBreaks() { final long[] horizontalBreaks = breaks.getHorizontalBreaks(); final int breakCount = horizontalBreaks.length; final LongList pageLongList = new LongList( breakCount ); for ( int i = 0; i < ( breakCount - 1 ); i++ ) { final long pos = horizontalBreaks[i]; if ( pos <= start ) { // skip .. continue; } if ( overflowX == false && pos >= end ) { break; } pageLongList.add( pos ); } pageLongList.add( end ); this.pagebreaks = pageLongList.toArray( this.pagebreaks ); }
public int getMaxValidatedRowSpan() { return this.validatedTrailingSize.size(); }
public void addRow( final int index, final long rowHeight ) { gridHeights.set( index, rowHeight ); }
public long get( final int index ) { if ( index < 0 ) { throw new IndexOutOfBoundsException(); } if ( index >= size() ) { return 0; } return super.get( index ); }
public void fill( final long value ) { super.fill( value ); } }
protected void updateBreaksForLastLineAlignment() { final long[] horizontalBreaks = getPageGrid().getHorizontalBreaks(); final int breakCount = horizontalBreaks.length; final LongList pageLongList = new LongList( breakCount ); final long endOfLine = getEndOfLine(); final long startOfLine = getStartOfLine(); for ( int i = 0; i < breakCount; i++ ) { final long pos = horizontalBreaks[i]; if ( pos <= startOfLine ) { // skip .. continue; } if ( pos >= endOfLine ) { break; } pageLongList.add( pos ); } // pageLongList.add(endOfLine); pageLongList.add( Long.MAX_VALUE ); final long[] pagebreaks = getPageBreaks(); updatePageBreaks( pageLongList.toArray( pagebreaks ), pageLongList.size() ); } }
public void updateDefinedSize( final int rowSpan, final long preferredHeight ) { if ( rowSpan < 1 ) { throw new IllegalArgumentException(); } final int idx = rowSpan - 1; if ( ( idx >= preferredSizes.size() ) || ( preferredSizes.get( idx ) < preferredHeight ) ) { preferredSizes.set( idx, preferredHeight ); } }
public int getMaximumRowSpan() { return preferredSizes.size(); }
public void setCachedSize( final int colSpan, final long size ) { final int idx = colSpan - 1; if ( getCachedSize( colSpan ) < size ) { cachedSize.set( idx, size ); } }
AttributeList rowAttributes = styleCache.getRowAttributes( row ); if ( rowAttributes == null ) { final int rowHeight = (int) StrictGeomUtility.toExternalValue( gridLayout.getCellHeights().get( row ) ); final HtmlRowBackgroundStruct struct = getCommonBackground( gridLayout, colCount, row ); rowAttributes = getTagHelper().createRowAttributes( rowHeight, struct );
public int getMaxColspan() { return cachedSize.size(); }
public TableColumn( final Border border, final RenderLength definedWidth, final boolean autoGenerated ) { if ( border == null ) { throw new NullPointerException(); } if ( definedWidth == null ) { throw new NullPointerException(); } this.definedWidth = definedWidth; this.border = border; this.autoGenerated = autoGenerated; this.cachedSize = new LongList( 10 ); }