|
fop 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.area.AreaTreeObject
org.apache.fop.area.PageViewport
public class PageViewport
Page viewport that specifies the viewport area and holds the page contents. This is the top level object for a page and remains valid for the life of the document and the area tree. This object may be used as a key to reference a page. This is the level that creates the page. The page (reference area) is then rendered inside the page object
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
logging instance |
Fields inherited from class org.apache.fop.area.AreaTreeObject |
---|
extensionAttachments, foreignAttributes |
Constructor Summary | |
---|---|
PageViewport(PageViewport original)
Copy constructor. |
|
PageViewport(java.awt.Rectangle viewArea,
int pageNumber,
java.lang.String pageStr,
java.lang.String simplePageMasterName,
boolean blank)
Constructor used by the area tree parser. |
|
PageViewport(SimplePageMaster spm,
int pageNumber,
java.lang.String pageStr,
boolean blank)
Create a page viewport. |
Method Summary | |
---|---|
void |
addMarkers(java.util.Map marks,
boolean starting,
boolean isfirst,
boolean islast)
Add the markers for this page. |
void |
addUnresolvedIDRef(java.lang.String idref,
Resolvable res)
Add an idref to this page. |
void |
clear()
Clear the page contents to save memory. |
java.lang.Object |
clone()
Clone this page. |
Span |
createSpan(boolean spanAll)
Convenience method to create a new Span for this this PageViewport. |
void |
dumpMarkers()
Dumps the current marker data to the logger. |
BodyRegion |
getBodyRegion()
Convenience method to get BodyRegion of this PageViewport |
NormalFlow |
getCurrentFlow()
Convenience method to get the normal-flow-reference-area currently being processed |
Span |
getCurrentSpan()
Convenience method to get the span-reference-area currently being processed |
java.lang.String[] |
getIDRefs()
Get the unresolved idrefs for this page. |
java.lang.String |
getKey()
Get the key for this page viewport. |
java.lang.Object |
getMarker(java.lang.String name,
int pos)
Get a marker from this page. |
Page |
getPage()
Get the page reference area with the contents. |
int |
getPageIndex()
|
int |
getPageNumber()
Get the page number of this page. |
java.lang.String |
getPageNumberString()
Get the page number of this page. |
PageSequence |
getPageSequence()
|
RegionReference |
getRegionReference(int id)
Convenience method to return a given region-reference-area, keyed by the Constants class identifier for the corresponding formatting object (ie. |
java.lang.String |
getSimplePageMasterName()
|
java.awt.Rectangle |
getViewArea()
Get the view area rectangle of this viewport. |
boolean |
isBlank()
|
boolean |
isFirstWithID(java.lang.String id)
Check whether a certain id first appears on this page |
boolean |
isResolved()
Check if this page has been fully resolved. |
void |
loadPage(java.io.ObjectInputStream in)
Load the page contents from an object stream. |
NormalFlow |
moveToNextFlow()
Convenience method to increment the Span to the next NormalFlow to be processed, and to return that flow. |
void |
resolveIDRef(java.lang.String id,
java.util.List pages)
This method allows the Resolvable object to resolve one of its unresolved idrefs with the actual set of PageViewports containing the target ID. |
void |
savePage(java.io.ObjectOutputStream out)
Save the page contents to an object stream. |
void |
setFirstWithID(java.lang.String id)
Add an "ID-first" to this page. |
void |
setKey(java.lang.String key)
Sets the unique key for this PageViewport that will be used to reference this page. |
void |
setPage(Page page)
Sets the page object for this PageViewport. |
void |
setPageIndex(int index)
Sets the page index of the page in this rendering run. |
void |
setPageSequence(PageSequence seq)
Sets the page sequence this page belongs to |
java.lang.String |
toString()
|
Methods inherited from class org.apache.fop.area.AreaTreeObject |
---|
addExtensionAttachment, getExtensionAttachments, getForeignAttributes, getForeignAttributeValue, hasExtensionAttachments, setExtensionAttachments, setForeignAttribute, setForeignAttributes |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
Constructor Detail |
---|
public PageViewport(SimplePageMaster spm, int pageNumber, java.lang.String pageStr, boolean blank)
spm
- SimplePageMaster indicating the page and region dimensionspageNumber
- the page numberpageStr
- String representation of the page numberblank
- true if this is a blank pagepublic PageViewport(PageViewport original)
original
- the original PageViewport to copy frompublic PageViewport(java.awt.Rectangle viewArea, int pageNumber, java.lang.String pageStr, java.lang.String simplePageMasterName, boolean blank)
viewArea
- the view areapageNumber
- the page numberpageStr
- String representation of the page numbersimplePageMasterName
- name of the original simple-page-master that generated this pageblank
- true if this is a blank pageMethod Detail |
---|
public void setPageSequence(PageSequence seq)
seq
- the page sequencepublic PageSequence getPageSequence()
public java.awt.Rectangle getViewArea()
public Page getPage()
public void setPage(Page page)
page
- the pagepublic int getPageNumber()
public java.lang.String getPageNumberString()
public void setPageIndex(int index)
index
- the page index (zero-based), -1 if it is undeterminedpublic int getPageIndex()
public void setKey(java.lang.String key)
key
- the unique key.public java.lang.String getKey()
public void setFirstWithID(java.lang.String id)
id
- the id to be registered as first appearing on this pagepublic boolean isFirstWithID(java.lang.String id)
id
- the id to be checked
public void addUnresolvedIDRef(java.lang.String idref, Resolvable res)
idref
- the idrefres
- the child element of this page that needs this
idref resolvedpublic boolean isResolved()
isResolved
in interface Resolvable
public java.lang.String[] getIDRefs()
getIDRefs
in interface Resolvable
public void resolveIDRef(java.lang.String id, java.util.List pages)
resolveIDRef
in interface Resolvable
id
- an ID matching one of the Resolvable object's
unresolved idref's.pages
- the list of PageViewports with the given IDpublic void addMarkers(java.util.Map marks, boolean starting, boolean isfirst, boolean islast)
marks
- the map of markers to addstarting
- if the area being added is starting or endingisfirst
- if the area being added has is-first traitislast
- if the area being added has is-last traitpublic java.lang.Object getMarker(java.lang.String name, int pos)
name
- The class name of the marker to retrievepos
- the position to retrieve
public void dumpMarkers()
public void savePage(java.io.ObjectOutputStream out) throws java.io.IOException
out
- the object output stream to write the contents
java.io.IOException
- in case of an I/O error while serializing the pagepublic void loadPage(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
in
- the object input stream to read the page from
java.lang.ClassNotFoundException
- if a class was not found while loading the page
java.io.IOException
- if an I/O error occurred while loading the pagepublic java.lang.Object clone()
clone
in class java.lang.Object
public void clear()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getSimplePageMasterName()
public boolean isBlank()
public BodyRegion getBodyRegion()
public Span createSpan(boolean spanAll)
spanAll
- whether this is a single-column span
public Span getCurrentSpan()
public NormalFlow getCurrentFlow()
public NormalFlow moveToNextFlow()
public RegionReference getRegionReference(int id)
id
- the Constants class identifier for the region.
|
fop 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |