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

java.lang.Object
  |
  +--com.jrefinery.report.targets.pageable.operations.BoundsAlignment
        |
        +--com.jrefinery.report.targets.pageable.operations.VerticalBoundsAlignment
              |
              +--com.jrefinery.report.targets.pageable.operations.MiddleAlignment

public class MiddleAlignment
extends VerticalBoundsAlignment

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

Author:
Thomas Morgner

Constructor Summary
MiddleAlignment(java.awt.geom.Rectangle2D bounds)
          Creates a new middle alignment object.
 
Method Summary
 java.awt.geom.Rectangle2D align(java.awt.geom.Rectangle2D r)
          Aligns a rectangle with the current bounds.
 
Methods inherited from class com.jrefinery.report.targets.pageable.operations.VerticalBoundsAlignment
applyShift, calculateShift, getHorizontalShift
 
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

MiddleAlignment

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

Parameters:
bounds - the current bounds.
Method Detail

align

public java.awt.geom.Rectangle2D align(java.awt.geom.Rectangle2D r)
Aligns a rectangle with the current bounds.

Specified by:
align in class BoundsAlignment
Parameters:
r - the rectangle to align (null not permitted).
Returns:
the aligned rectangle.