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.

    Thomas Morgner
    • Method Detail

      • getWidth

        float getWidth()
        Returns the total width of the logical page.
        the width of the page.
      • getHeight

        float getHeight()
        Returns the total height of the logical page.
        the height of the page.
      • getPageCount

        int getPageCount()
        Returns the number of physical pages in this logical page definition.
        the number of physical pages in the page definition.
      • getPagePositions

        Rectangle2D[] getPagePositions()
        Returns all page positions as array.
        the collected page positions
        See Also:
      • 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).
        index - the index of the physical pageformat
        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.
        pos - the position of the pageformat within the page
        the given pageformat.