Interface PageDefinition
-
- All Superinterfaces:
Cloneable
,Serializable
- All Known Implementing Classes:
CustomPageDefinition
,SimplePageDefinition
public interface PageDefinition extends Cloneable, Serializable
A logical page definition for a report. Page oriented reports use the page definition to distribute the content of one logical page to the physical pages. The order of the physical pages in the page definition defines the content order in the generated documents. Flow oriented reports will use the page-definitions width as default width for the layouting. If a logical page is completly empty, it will be removed from the report and a pageCanceled event is fired. If a physical page within a non empty logical page is empty, if depends on the ReportProcessor whether the page is printed as empty page or whether it will be removed from the report. Areas of the logical page not covered by the physical pages will not cause errors, the content in these areas will be ignored and not printed. Page definitions must not be changed during the report processing, or funny things will happen.- Author:
- Thomas Morgner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
clone()
Creates a copy of the page definition.float
getHeight()
Returns the total height of the logical page.int
getPageCount()
Returns the number of physical pages in this logical page definition.PageFormat
getPageFormat(int pos)
Returns the page format for the given page number.Rectangle2D
getPagePosition(int index)
Describes the internal position of the given page within the logical page.Rectangle2D[]
getPagePositions()
Returns all page positions as array.float
getWidth()
Returns the total width of the logical page.
-
-
-
Method Detail
-
getWidth
float getWidth()
Returns the total width of the logical page.- Returns:
- the width of the page.
-
getHeight
float getHeight()
Returns the total height of the logical page.- Returns:
- the height of the page.
-
getPageCount
int getPageCount()
Returns the number of physical pages in this logical page definition.- Returns:
- the number of physical pages in the page definition.
-
getPagePositions
Rectangle2D[] getPagePositions()
Returns all page positions as array.- Returns:
- the collected page positions
- See Also:
getPagePosition(int)
-
getPagePosition
Rectangle2D getPagePosition(int index)
Describes the internal position of the given page within the logical page. The logical page does not include any page margins, the printable area for a page starts at (0,0).- Parameters:
index
- the index of the physical pageformat- Returns:
- the bounds for the page.
-
getPageFormat
PageFormat getPageFormat(int pos)
Returns the page format for the given page number. The page format contains local coordinates - that means that the point (0,0) denotes the upper left corner of this returned page format and not global coordinates.- Parameters:
pos
- the position of the pageformat within the page- Returns:
- the given pageformat.
-
clone
Object clone() throws CloneNotSupportedException
Creates a copy of the page definition.- Returns:
- a copy of the page definition.
- Throws:
CloneNotSupportedException
- if cloning failed for some reason.
-
-