Class PhysicalPageDrawable
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.internal.PhysicalPageDrawable
-
- All Implemented Interfaces:
PageDrawable
public class PhysicalPageDrawable extends Object implements PageDrawable
Creation-Date: 17.11.2006, 18:00:46- Author:
- Thomas Morgner
-
-
Constructor Summary
Constructors Constructor Description PhysicalPageDrawable(LogicalPageDrawable pageDrawable, PhysicalPageBox page)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
draw(Graphics2D g2, Rectangle2D area)
Draws the object.RenderNode[]
getNodesAt(double x, double y, double width, double height, String namespace, String name)
Returns all layouted render-nodes that occupy the given area and which have the attribute specified by name and namespace set.RenderNode[]
getNodesAt(double x, double y, String namespace, String name)
Returns all layouted render-nodes that occupy the given point and which have the attribute specified by name and namespace set.LogicalPageDrawable
getPageDrawable()
PageFormat
getPageFormat()
Describes the physical output characteristics like page size, margins, and imaginable area.Dimension
getPreferredSize()
Returns the preferred size of the output.boolean
isPreserveAspectRatio()
-
-
-
Constructor Detail
-
PhysicalPageDrawable
public PhysicalPageDrawable(LogicalPageDrawable pageDrawable, PhysicalPageBox page)
- Parameters:
pageDrawable
-page
-
-
-
Method Detail
-
getPageFormat
public PageFormat getPageFormat()
Description copied from interface:PageDrawable
Describes the physical output characteristics like page size, margins, and imaginable area.- Specified by:
getPageFormat
in interfacePageDrawable
- Returns:
- a pageformat describing the current page including size and margins.
-
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 interfacePageDrawable
- Returns:
- the preferred size.
-
isPreserveAspectRatio
public boolean isPreserveAspectRatio()
-
draw
public void draw(Graphics2D g2, Rectangle2D area)
Draws the object.- Specified by:
draw
in interfacePageDrawable
- Parameters:
g2
- the graphics device.area
- the area inside which the object should be drawn.
-
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 interfacePageDrawable
- 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 interfacePageDrawable
- 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.
-
getPageDrawable
public LogicalPageDrawable getPageDrawable()
-
-