org.jfree.report.modules.output.pageable.base.operations
Class CenterAlignment

java.lang.Object
  extended byorg.jfree.report.modules.output.pageable.base.operations.BoundsAlignment
      extended byorg.jfree.report.modules.output.pageable.base.operations.HorizontalBoundsAlignment
          extended byorg.jfree.report.modules.output.pageable.base.operations.CenterAlignment

public class CenterAlignment
extends HorizontalBoundsAlignment

A utility class that can align a rectangle to the (horizontal) center of the current bounds.

Author:
Thomas Morgner

Constructor Summary
CenterAlignment(java.awt.geom.Rectangle2D bounds)
          Creates a new alignment object.
 
Method Summary
 java.awt.geom.Rectangle2D align(java.awt.geom.Rectangle2D inner)
          Aligns a rectangle to the (horizontal) center of the current bounds.
 
Methods inherited from class org.jfree.report.modules.output.pageable.base.operations.BoundsAlignment
getReferenceBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CenterAlignment

public CenterAlignment(java.awt.geom.Rectangle2D bounds)
Creates a new alignment object.

Parameters:
bounds - the bounds.
Method Detail

align

public java.awt.geom.Rectangle2D align(java.awt.geom.Rectangle2D inner)
Aligns a rectangle to the (horizontal) center of the current bounds.

Specified by:
align in class BoundsAlignment
Parameters:
inner - the region to align.
Returns:
the aligned rectangle.