org.jfree.layouting.modules.output.graphics

Class PhysicalPageDrawable

Implemented Interfaces:
PageDrawable

public class PhysicalPageDrawable
extends java.lang.Object
implements PageDrawable

Creation-Date: 17.11.2006, 18:00:46
Author:
Thomas Morgner

Constructor Summary

PhysicalPageDrawable(LogicalPageDrawable pageDrawable, PhysicalPageBox page)

Method Summary

void
draw(Graphics2D g2, Rectangle2D area)
Draws the object.
PageFormat
getPageFormat()
Describes the physical output characteristics like page size, margins, and imaginable area.
Dimension
getPreferredSize()
Returns the preferred size of the drawable.
boolean
isPreserveAspectRatio()
Returns true, if this drawable will preserve an aspect ratio during the drawing.

Constructor Details

PhysicalPageDrawable

public PhysicalPageDrawable(LogicalPageDrawable pageDrawable,
                            PhysicalPageBox page)

Method Details

draw

public void draw(Graphics2D g2,
                 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.

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()
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.