Class PageArea


  • public class PageArea
    extends Object
    Describes a rectangular area of a page or multiple pages. Is is used to specify exclusions and areas, that differ.
    • Constructor Detail

      • PageArea

        public PageArea​(int page)
        Defines the area for the whole page.
        Parameters:
        page - Page number starting with 1
      • PageArea

        public PageArea​(int x1,
                        int y1,
                        int x2,
                        int y2)
        Defines the same area for every page.
        Parameters:
        x1 - x-coordinate of the upper left corner of the rectangle
        y1 - y-coordinate of the upper left corner of the rectangle
        x2 - x-coordinate of the lower right corner of the rectangle
        y2 - y-coordinate of the lower right corner of the rectangle
      • PageArea

        public PageArea​(int page,
                        int x1,
                        int y1,
                        int x2,
                        int y2)
        Defines an area for one particular page.
        Parameters:
        page - Page number starting with 1
        x1 - x-coordinate of the upper left corner of the rectangle
        y1 - y-coordinate of the upper left corner of the rectangle
        x2 - x-coordinate of the lower right corner of the rectangle
        y2 - y-coordinate of the lower right corner of the rectangle
    • Method Detail

      • hasPage

        public boolean hasPage()
      • hasCoordinates

        public boolean hasCoordinates()
      • contains

        public boolean contains​(int x,
                                int y)
      • getPage

        public int getPage()
      • getX1

        public int getX1()
      • getY1

        public int getY1()
      • getX2

        public int getX2()
      • getY2

        public int getY2()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • asJson

        public String asJson()
      • asJsonWithExclusion

        public static String asJsonWithExclusion​(Stream<PageArea> pageAreaStream)