Class SimplePageDefinition
java.lang.Object
org.pentaho.reporting.engine.classic.core.SimplePageDefinition
- All Implemented Interfaces:
Serializable
,Cloneable
,PageDefinition
A simple page definition defines a logical page, for which all physical pages have the same size.
The page area is a rectangle.
- Author:
- Thomas Morgner
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSimplePageDefinition
(PageFormat format) Creates a 1x1 page defintion.SimplePageDefinition
(PageFormat format, int x, int y) Creates a new SimplePageDefinition object.SimplePageDefinition
(PageSize papersize) Creates a 1x1 page defintion.SimplePageDefinition
(PageSize papersize, int orientation, Insets margins) Creates a 1x1 page defintion. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a copy of this page definition.boolean
Checks whether this page definition object is equal to the given object.float
Returns the total height of the logical page.int
Returns the number of physical pages in this page definition.int
Returns the number of horizontal pages in this page definition.int
Returns the number of vertical pages in this page definition.getPageFormat
(int pos) Returns the physical page format for the given position.getPagePosition
(int index) Returns the printable area within the logical page area covered by the physical page at the given position.Returns all page position known to this page definition.float
getWidth()
Returns the total width of the logical page.int
hashCode()
Computes a hashcode for this page definition.toString()
-
Constructor Details
-
SimplePageDefinition
Creates a new SimplePageDefinition object.- Parameters:
format
- the pageformat used as base.x
- the number of physical pages in a row.y
- the number of physical pages in a column.
-
SimplePageDefinition
Creates a 1x1 page defintion. The physical page size is equal to the logical page size.- Parameters:
format
- the pageformat.
-
SimplePageDefinition
Creates a 1x1 page defintion. The physical page size is equal to the logical page size. -
SimplePageDefinition
Creates a 1x1 page defintion. The physical page size is equal to the logical page size.
-
-
Method Details
-
getPageCount
public int getPageCount()Returns the number of physical pages in this page definition.- Specified by:
getPageCount
in interfacePageDefinition
- Returns:
- the number of pages.
-
getPageFormat
Returns the physical page format for the given position.- Specified by:
getPageFormat
in interfacePageDefinition
- Parameters:
pos
- the position in the page grid.- Returns:
- a clone of the pageformat at the specified positon.
-
getPagePosition
Returns the printable area within the logical page area covered by the physical page at the given position.- Specified by:
getPagePosition
in interfacePageDefinition
- Parameters:
index
- the positon.- Returns:
- the printable area for the page.
-
getPagePositions
Returns all page position known to this page definition.- Specified by:
getPagePositions
in interfacePageDefinition
- Returns:
- the page positions.
- See Also:
-
getHeight
public float getHeight()Returns the total height of the logical page.- Specified by:
getHeight
in interfacePageDefinition
- Returns:
- the height of the page.
-
getWidth
public float getWidth()Returns the total width of the logical page.- Specified by:
getWidth
in interfacePageDefinition
- Returns:
- the width of the page.
-
clone
Creates a copy of this page definition.- Specified by:
clone
in interfacePageDefinition
- Overrides:
clone
in classObject
- Returns:
- a clone of this page definition object.
- Throws:
CloneNotSupportedException
-
equals
Checks whether this page definition object is equal to the given object. -
getPageCountHorizontal
public int getPageCountHorizontal()Returns the number of horizontal pages in this page definition. That number is always greater than zero.- Returns:
- the horizontal page count.
-
getPageCountVertical
public int getPageCountVertical()Returns the number of vertical pages in this page definition. That number is always greater than zero.- Returns:
- the vertical page count.
-
hashCode
public int hashCode()Computes a hashcode for this page definition. -
getPageFormat
-
toString
-