Class Page
java.lang.Object
org.apache.fop.area.AreaTreeObject
org.apache.fop.area.Page
- All Implemented Interfaces:
Serializable, Cloneable
The page.
This holds the contents of the page. Each region is added.
The unresolved references area added so that if the page is
serialized then it will handle the resolving properly after
being reloaded.
This is serializable so it can be saved to cache to save
memory if there are forward references.
The page is cloneable so the page master can make copies of
the top level page and regions.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanSet to true to make this page behave as if it were not empty.private RegionViewportprivate RegionViewportprivate RegionViewportprivate RegionViewportprivate RegionViewportprivate static final longprivate Map<String, List<Resolvable>> Fields inherited from class AreaTreeObject
extensionAttachments, foreignAttributes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()voidCall this method to force this page to pretend not to be empty.getRegionViewport(int areaClass) Get the region from this page.Map<String, List<Resolvable>> Get the map unresolved references from this page.booleanisEmpty()Indicates whether any FOs have been added to the body regionprivate static RegionViewportmakeRegionViewport(Region r, FODimension reldims, CTM pageCTM) Creates a RegionViewport Area object for this pagination Region.private static voidsetRegionReferencePosition(RegionReference rr, Region r, Rectangle2D absRegVPRect) Set the region reference position within the region viewport.voidsetRegionViewport(int areaclass, RegionViewport port) Set the region on this page.voidsetUnresolvedReferences(Map<String, List<Resolvable>> unres) Set the unresolved references on this page for serializing.voidSets the writing mode traits for the region viewports of this page.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
regionBefore
-
regionStart
-
regionBody
-
regionEnd
-
regionAfter
-
unresolved
-
fakeNonEmpty
private boolean fakeNonEmptySet to true to make this page behave as if it were not empty.
-
-
Constructor Details
-
Page
public Page()Empty constructor -
Page
Constructor- Parameters:
spm- SimplePageMaster containing the dimensions for this page-reference-area
-
-
Method Details
-
fakeNonEmpty
public void fakeNonEmpty()Call this method to force this page to pretend not to be empty. -
makeRegionViewport
Creates a RegionViewport Area object for this pagination Region.- Parameters:
r- the region the viewport is to be created forreldims- relative dimensionspageCTM- page coordinate transformation matrix- Returns:
- the new region viewport
-
setRegionReferencePosition
private static void setRegionReferencePosition(RegionReference rr, Region r, Rectangle2D absRegVPRect) Set the region reference position within the region viewport. This sets the transform that is used to place the contents of the region reference.- Parameters:
rr- the region reference arear- the region-xxx formatting objectabsRegVPRect- The region viewport rectangle in "absolute" coordinates where x=distance from left, y=distance from bottom, width=right-left height=top-bottom
-
setRegionViewport
Set the region on this page.- Parameters:
areaclass- the area class of the region to setport- the region viewport to set
-
getRegionViewport
Get the region from this page.- Parameters:
areaClass- the region area class- Returns:
- the region viewport or null if none
-
isEmpty
public boolean isEmpty()Indicates whether any FOs have been added to the body region- Returns:
- whether any FOs have been added to the body region
-
clone
- Overrides:
clonein classAreaTreeObject- Throws:
CloneNotSupportedException
-
setUnresolvedReferences
Set the unresolved references on this page for serializing.- Parameters:
unres- the Map of unresolved objects
-
getUnresolvedReferences
Get the map unresolved references from this page. This should be called after deserializing to retrieve the map of unresolved references that were serialized.- Returns:
- the de-serialized HashMap of unresolved objects
-
setWritingModeTraits
Sets the writing mode traits for the region viewports of this page.- Parameters:
wmtg- a WM traits getter
-