Package org.apache.fop.fo.pagination
Interface SubSequenceSpecifier
-
- All Known Implementing Classes:
RepeatablePageMasterAlternatives
,RepeatablePageMasterReference
,SinglePageMasterReference
public interface SubSequenceSpecifier
Classes that implement this interface can be added to aPageSequenceMaster
, and are capable of looking up an appropriateSimplePageMaster
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canProcess(java.lang.String flowName)
SimplePageMaster
getLastPageMaster(boolean isOddPage, boolean isFirstPage, boolean isBlankPage, BlockLevelEventProducer blockLevelEventProducer)
SimplePageMaster
getNextPageMaster(boolean isOddPage, boolean isFirstPage, boolean isLastPage, boolean isBlankPage)
Returns the name of the next page master.boolean
goToPrevious()
Used to set the "cursor position" to the previous item.boolean
hasPagePositionLast()
boolean
hasPagePositionOnly()
boolean
isInfinite()
Test that this is a finite sequenceboolean
isReusable()
Test if this can be reused when it is the last sub-sequence specifer, and has been exhaustedvoid
reset()
Called before a new page sequence is rendered so subsequences can reset any state they keep during the formatting process.void
resolveReferences(LayoutMasterSet layoutMasterSet)
called by the parent LayoutMasterSet to resolve object references from simple page master reference names
-
-
-
Method Detail
-
getNextPageMaster
SimplePageMaster getNextPageMaster(boolean isOddPage, boolean isFirstPage, boolean isLastPage, boolean isBlankPage) throws PageProductionException
Returns the name of the next page master.- Parameters:
isOddPage
- True if the next page number is oddisFirstPage
- True if the next page is the firstisLastPage
- True if the next page is the lastisBlankPage
- True if the next page is blank- Returns:
- the page master name
- Throws:
PageProductionException
- if there's a problem determining the next page master
-
getLastPageMaster
SimplePageMaster getLastPageMaster(boolean isOddPage, boolean isFirstPage, boolean isBlankPage, BlockLevelEventProducer blockLevelEventProducer) throws PageProductionException
- Throws:
PageProductionException
-
reset
void reset()
Called before a new page sequence is rendered so subsequences can reset any state they keep during the formatting process.
-
goToPrevious
boolean goToPrevious()
Used to set the "cursor position" to the previous item.- Returns:
- true if there is a previous item, false if the current one was the first one.
-
hasPagePositionLast
boolean hasPagePositionLast()
- Returns:
- true if the subsequence has a page master for page-position "last"
-
hasPagePositionOnly
boolean hasPagePositionOnly()
- Returns:
- true if the subsequence has a page master for page-position "only"
-
resolveReferences
void resolveReferences(LayoutMasterSet layoutMasterSet) throws ValidationException
called by the parent LayoutMasterSet to resolve object references from simple page master reference names- Parameters:
layoutMasterSet
- the layout-master-set- Throws:
ValidationException
- when a named reference cannot be resolved
-
canProcess
boolean canProcess(java.lang.String flowName)
- Parameters:
flowName
- name of the main flow- Returns:
- true iff page sequence is a finite sequence or can process the entire main flow
-
isInfinite
boolean isInfinite()
Test that this is a finite sequence- Returns:
- true iff this is a finite sequence
-
isReusable
boolean isReusable()
Test if this can be reused when it is the last sub-sequence specifer, and has been exhausted- Returns:
- true if and only if it can be reused
-
-