Class SimplePageDefinition

    • Constructor Detail

      • SimplePageDefinition

        public SimplePageDefinition​(PageFormat format,
                                    int x,
                                    int y)
        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

        public SimplePageDefinition​(PageFormat format)
        Creates a 1x1 page defintion. The physical page size is equal to the logical page size.
        Parameters:
        format - the pageformat.
      • SimplePageDefinition

        public SimplePageDefinition​(PageSize papersize,
                                    int orientation,
                                    Insets margins)
        Creates a 1x1 page defintion. The physical page size is equal to the logical page size.
      • SimplePageDefinition

        public SimplePageDefinition​(PageSize papersize)
        Creates a 1x1 page defintion. The physical page size is equal to the logical page size.
    • Method Detail

      • getPageCount

        public int getPageCount()
        Returns the number of physical pages in this page definition.
        Specified by:
        getPageCount in interface PageDefinition
        Returns:
        the number of pages.
      • getPageFormat

        public PageFormat getPageFormat​(int pos)
        Returns the physical page format for the given position.
        Specified by:
        getPageFormat in interface PageDefinition
        Parameters:
        pos - the position in the page grid.
        Returns:
        a clone of the pageformat at the specified positon.
      • getPagePosition

        public Rectangle2D getPagePosition​(int index)
        Returns the printable area within the logical page area covered by the physical page at the given position.
        Specified by:
        getPagePosition in interface PageDefinition
        Parameters:
        index - the positon.
        Returns:
        the printable area for the page.
      • getHeight

        public float getHeight()
        Returns the total height of the logical page.
        Specified by:
        getHeight in interface PageDefinition
        Returns:
        the height of the page.
      • getWidth

        public float getWidth()
        Returns the total width of the logical page.
        Specified by:
        getWidth in interface PageDefinition
        Returns:
        the width of the page.
      • equals

        public boolean equals​(Object obj)
        Checks whether this page definition object is equal to the given object.
        Overrides:
        equals in class Object
        Parameters:
        obj - the other object.
        Returns:
        true, if that object is the same as this object, false otherwise.
      • 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.
        Overrides:
        hashCode in class Object
        Returns:
        the hashcode.
      • getPageFormat

        public PageFormat getPageFormat()