public abstract class PageBreakCollection<T extends PageBreak> extends Object implements Iterable<T>
Following code demonstrates how to add PageBreaks to ExcelWorksheet.
int columnsPerPage = 6, rowsPerPage = 30;
int usedColumnsCount = ws.calculateMaxUsedColumns();
for (int i = columnsPerPage; i < usedColumnsCount; i += columnsPerPage)
ws.getVerticalPageBreaks().add(i);
for (int i = rowsPerPage; i < ws.getRows().size(); i += rowsPerPage)
ws.getHorizontalPageBreaks().add(i);
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all page breaks.
|
Iterator<T> |
iterator()
Returns an iterator for the collection.
|
void |
remove(int index)
Removes the page break at the specified index.
|
int |
size()
Gets the number of page breaks contained in the collection.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public final void clear()
public final void remove(int index)
index
- The zero-based index of the page break to remove.public final int size()
© GemBox Ltd. — All rights reserved.