|
fop 0.93 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.layoutmgr.PageSequenceLayoutManager.PageProvider
This class delivers Page instances. It also caches them as necessary.
Additional functionality makes sure that surplus instances that are requested by the page breaker are properly discarded, especially in situations where hard breaks cause blank pages. The reason for that: The page breaker sometimes needs to preallocate additional pages since it doesn't know exactly until the end how many pages it really needs.
Field Summary | |
static int |
RELTO_CURRENT_ELEMENT_LIST
Indices are evaluated relative to the first page in the current element list. |
static int |
RELTO_PAGE_SEQUENCE
Indices are evaluated relative to the first page in the page-sequence. |
Constructor Summary | |
PageSequenceLayoutManager.PageProvider(PageSequence ps)
Main constructor. |
Method Summary | |
int |
getAvailableBPD(int index)
Returns the available BPD for the part/page indicated by the index parameter. |
Page |
getPage(boolean isBlank,
int index,
int relativeTo)
Returns a Page. |
int |
getStartingPartIndexForLastPage(int partCount)
Returns the part index (0 |
void |
setLastPageIndex(int index)
Sets the index of the last page. |
void |
setStartOfNextElementList(int startPage,
int startColumn)
The page breaker notifies the provider about the page number an element list starts on so it can later retrieve PageViewports relative to this first page. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int RELTO_PAGE_SEQUENCE
public static final int RELTO_CURRENT_ELEMENT_LIST
Constructor Detail |
public PageSequenceLayoutManager.PageProvider(PageSequence ps)
ps
- The page-sequence the provider operates onMethod Detail |
public void setStartOfNextElementList(int startPage, int startColumn)
startPage
- the number of the first page for the element list.startColumn
- the starting column number for the element list.public void setLastPageIndex(int index)
index
- the index relative to the first page in the page-sequencepublic int getAvailableBPD(int index)
index
- zero-based index of the requested part/page
public int getStartingPartIndexForLastPage(int partCount)
partCount
- Number of parts determined by the breaking algorithm
public Page getPage(boolean isBlank, int index, int relativeTo)
isBlank
- true if this page is supposed to be blank.index
- Index of the page (see relativeTo)relativeTo
- Defines which value the index parameter should be evaluated relative
to. (One of PageProvider.RELTO_*)
|
fop 0.93 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |