Class LogicalPageDrawable

  • All Implemented Interfaces:
    PageDrawable

    public class LogicalPageDrawable
    extends java.lang.Object
    implements PageDrawable
    The page drawable is the content provider for the Graphics2DOutputTarget. This component is responsible for rendering the current page to a Graphics2D object.
    Author:
    Thomas Morgner
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void draw​(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area)
      Draws the object.
      void drawBox​(java.awt.Graphics2D g2, RenderBox box, int level)  
      java.awt.print.PageFormat getPageFormat()
      Describes the physical output characteristics like page size, margins, and imaginable area.
      java.awt.Dimension getPreferredSize()
      Returns the preferred size of the drawable.
      static java.lang.String glpyhToString​(Glyph g)  
      boolean isPreserveAspectRatio()
      Returns true, if this drawable will preserve an aspect ratio during the drawing.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LogicalPageDrawable

        public LogicalPageDrawable​(LogicalPageBox rootBox)
    • Method Detail

      • getPageFormat

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

        public java.awt.Dimension getPreferredSize()
        Returns the preferred size of the drawable. If the drawable is aspect ratio aware, these bounds should be used to compute the preferred aspect ratio for this drawable.
        Specified by:
        getPreferredSize in interface PageDrawable
        Returns:
        the preferred size.
      • isPreserveAspectRatio

        public boolean isPreserveAspectRatio()
        Returns true, if this drawable will preserve an aspect ratio during the drawing.
        Specified by:
        isPreserveAspectRatio in interface PageDrawable
        Returns:
        true, if an aspect ratio is preserved, false otherwise.
      • draw

        public void draw​(java.awt.Graphics2D g2,
                         java.awt.geom.Rectangle2D area)
        Draws the object.
        Specified by:
        draw in interface PageDrawable
        Parameters:
        g2 - the graphics device.
        area - the area inside which the object should be drawn.
      • drawBox

        public void drawBox​(java.awt.Graphics2D g2,
                            RenderBox box,
                            int level)
      • glpyhToString

        public static java.lang.String glpyhToString​(Glyph g)