com.jrefinery.report.targets.pageable.operations
Class CenterAlignment

java.lang.Object
  |
  +--com.jrefinery.report.targets.pageable.operations.BoundsAlignment
        |
        +--com.jrefinery.report.targets.pageable.operations.HorizontalBoundsAlignment
              |
              +--com.jrefinery.report.targets.pageable.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 com.jrefinery.report.targets.pageable.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.