com.jrefinery.report.targets.table.rtf
Class RTFCellStyle

java.lang.Object
  extended bycom.jrefinery.report.targets.table.rtf.RTFCellStyle
Direct Known Subclasses:
RTFTextCellStyle

public class RTFCellStyle
extends java.lang.Object

The RTFCellStyle is used to define the style for the generated RTF-TableCell.

iText only supports the predefined logical fonts for RTF documents.

Author:
Thomas Morgner

Constructor Summary
RTFCellStyle(ElementAlignment verticalAlignment, ElementAlignment horizontalAlignment)
          Creates a new RTFCellStyle.
 
Method Summary
 void applyAlignment(com.lowagie.text.Cell cell)
          Defines the content alignment for the given iText cell.
 boolean equals(java.lang.Object o)
          Tests whether the given object is equal to this object.
 ElementAlignment getHorizontalAlignment()
          Returns the cell's horizontal alignment.
 ElementAlignment getVerticalAlignment()
          Returns the cell's vertical alignment.
 int hashCode()
          Calculates an Hashcode for this cell style.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTFCellStyle

public RTFCellStyle(ElementAlignment verticalAlignment,
                    ElementAlignment horizontalAlignment)
Creates a new RTFCellStyle.

Parameters:
verticalAlignment - the vertical text alignment.
horizontalAlignment - the horizontal text alignment.
Throws:
java.lang.NullPointerException - if one of the alignment parameters is null.
Method Detail

getVerticalAlignment

public ElementAlignment getVerticalAlignment()
Returns the cell's vertical alignment.

Returns:
the vertical alignment.

getHorizontalAlignment

public ElementAlignment getHorizontalAlignment()
Returns the cell's horizontal alignment.

Returns:
the horizontal alignment.

equals

public boolean equals(java.lang.Object o)
Tests whether the given object is equal to this object.

Parameters:
o - the to be compared object.
Returns:
true, if the object is a RTFCellStyle with the same attributes as this object.

hashCode

public int hashCode()
Calculates an Hashcode for this cell style.

Returns:
the hashcode.

applyAlignment

public void applyAlignment(com.lowagie.text.Cell cell)
Defines the content alignment for the given iText cell.

Parameters:
cell - the iText cell, that should be formated.