Class PhysicalPageDrawable

  • All Implemented Interfaces:
    PageDrawable

    public class PhysicalPageDrawable
    extends java.lang.Object
    implements PageDrawable
    Creation-Date: 17.11.2006, 18:00:46
    Author:
    Thomas Morgner
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void draw​(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area)
      Draws the object.
      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.
      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
    • 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()
        Description copied from interface: PageDrawable
        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()
        Description copied from interface: PageDrawable
        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.