Class PageFormatPreviewPane.SimplePageDrawable

    • Constructor Detail

      • SimplePageDrawable

        public SimplePageDrawable()
    • Method Detail

      • getPageFormat

        public PageFormat getPageFormat()
        Describes the physical output characteristics like page size, margins, and imaginable area.
        Specified by:
        getPageFormat in interface PageDrawable
        Returns:
      • getPreferredSize

        public Dimension getPreferredSize()
        Description copied from interface: PageDrawable
        Returns the preferred size of the output. This is part of the implicit 'drawable' contract.
        Specified by:
        getPreferredSize in interface PageDrawable
        Returns:
        the preferred size.
      • draw

        public void draw​(Graphics2D graphics,
                         Rectangle2D bounds)
        Description copied from interface: PageDrawable
        Renders the content of the drawable.
        Specified by:
        draw in interface PageDrawable
        Parameters:
        graphics - the graphics context to which to render to.
        bounds - the bounds within which the content should be rendered.
      • getNodesAt

        public RenderNode[] getNodesAt​(double x,
                                       double y,
                                       String namespace,
                                       String name)
        Description copied from interface: PageDrawable
        Returns all layouted render-nodes that occupy the given point and which have the attribute specified by name and namespace set. If name and namespace are null, all elements are returned. All units are given in the same coordinate system used for rendering via the "draw" method.
        Specified by:
        getNodesAt in interface PageDrawable
        Parameters:
        x - the x coordinate of the point.
        y - the y coordinate of the point.
        namespace - the attribute's namespace.
        name - the attribute's name.
        Returns:
        the nodes for the given point, or an empty array, but never null.
      • getNodesAt

        public RenderNode[] getNodesAt​(double x,
                                       double y,
                                       double width,
                                       double height,
                                       String namespace,
                                       String name)
        Description copied from interface: PageDrawable
        Returns all layouted render-nodes that occupy the given area and which have the attribute specified by name and namespace set. If name and namespace are null, all elements are returned. All units are given in the same coordinate system used for rendering via the "draw" method.
        Specified by:
        getNodesAt in interface PageDrawable
        Parameters:
        x - the x coordinate of the origin of the area.
        y - the y coordinate of the origin of the area.
        width - the height of the area.
        height - the width of the area.
        namespace - the attribute's namespace.
        name - the attribute's name.
        Returns:
        the nodes for the given point, or an empty array, but never null.