public class CustomPageDefinition extends Object implements PageDefinition
PageDefinition
,
Serialized FormConstructor and Description |
---|
CustomPageDefinition()
Creates a new (initialy empty and therefore invalid) page definition.
|
Modifier and Type | Method and Description |
---|---|
void |
addPageFormat(PageFormat format,
float x,
float y)
Adds a new page format to the page definition.
|
Object |
clone()
Clones the given page definition object.
|
boolean |
equals(Object obj)
Checks whether the given object is equal to this one.
|
float |
getHeight()
Returns the total height of the page definition.
|
int |
getPageCount()
Returns the number of physical pages in the 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 page definition.
|
int |
hashCode()
Computes the hashcode of this page definition.
|
public CustomPageDefinition()
public void addPageFormat(PageFormat format, float x, float y)
format
- the page formatx
- the x-position to where the imageable-x of the pageformat is mapped.y
- the y-position to where the imageable-y of the pageformat is mapped.public int getPageCount()
getPageCount
in interface PageDefinition
public PageFormat getPageFormat(int pos)
getPageFormat
in interface PageDefinition
pos
- the position of the pageformat within the pagepublic Rectangle2D getPagePosition(int index)
getPagePosition
in interface PageDefinition
index
- the index of the page.public Rectangle2D[] getPagePositions()
getPagePositions
in interface PageDefinition
PageDefinition.getPagePosition(int)
public float getWidth()
getWidth
in interface PageDefinition
public float getHeight()
getHeight
in interface PageDefinition
public Object clone() throws CloneNotSupportedException
clone
in interface PageDefinition
clone
in class Object
CloneNotSupportedException
- if an error occured.public boolean equals(Object obj)