com.arctorus.documents.table
Class CellStyle

java.lang.Object
  extended by com.arctorus.documents.table.CellStyle
All Implemented Interfaces:
java.lang.Cloneable

public final class CellStyle
extends java.lang.Object
implements java.lang.Cloneable

Style of a table cell. Contains alignment and fill style of a cell

By default any new created cell has next properties:

  • horizontal alignment - left
  • vertical alignment - top
  • borders - none


    Method Summary
     CellStyle clone()
              Creates and returns a copy of this object.
     boolean equals(java.lang.Object obj)
              Indicates whether some other object is "equal to" this one.
     FillFormat getFillFormat()
              Get fill properties of a cell.
     HorizontalAlignmentType getHorizontalAlignment()
              Get horizontal alignment of a cell content.
     CellStyleId getId()
              Get Id of this cell style.
     TextRotationType getTextRotationType()
              Get text rotation of a cell.
     VerticalAlignmentType getVerticalAlignment()
              Get vertical alignment of a cell content.
     int hashCode()
              Returns a hash code value for the object.
     boolean isShrinkToFit()
              Determines whether the text in the cell should be shrunk to fit the cell width.
     boolean isWrapText()
              Determines whether the text should be wrapped in a cell.
     void setFillFormat(FillFormat fillFormat)
              Set fill properties of a cell.
     void setHorizontalAlignment(HorizontalAlignmentType horizontalAlignment)
              Set horizontal alignment of a cell content.
     void setShrinkToFit(boolean shrinkToFit)
              Set whether the text in the cell should be shrunk to fit the cell width.
     void setTextRotationType(TextRotationType textRotationType)
              Set text rotation of a cell.
     void setVerticalAlignment(VerticalAlignmentType verticalAlignment)
              Set vertical alignment of a cell.
     void setWrapText(boolean wrapText)
              Set whether the text should be wrapped in a cell.
     
    Methods inherited from class java.lang.Object
    getClass, notify, notifyAll, toString, wait, wait, wait
     

    Method Detail

    getHorizontalAlignment

    public HorizontalAlignmentType getHorizontalAlignment()
    Get horizontal alignment of a cell content.


    setHorizontalAlignment

    public void setHorizontalAlignment(HorizontalAlignmentType horizontalAlignment)
    Set horizontal alignment of a cell content.

    Parameters:
    horizontalAlignment - new horizontal alignment.

    getVerticalAlignment

    public VerticalAlignmentType getVerticalAlignment()
    Get vertical alignment of a cell content.


    setVerticalAlignment

    public void setVerticalAlignment(VerticalAlignmentType verticalAlignment)
    Set vertical alignment of a cell.

    Parameters:
    verticalAlignment - new vertical alignment.

    getFillFormat

    public FillFormat getFillFormat()
    Get fill properties of a cell.


    setFillFormat

    public void setFillFormat(FillFormat fillFormat)
    Set fill properties of a cell.

    Parameters:
    fillFormat - new fill properties.

    getTextRotationType

    public TextRotationType getTextRotationType()
    Get text rotation of a cell.


    setTextRotationType

    public void setTextRotationType(TextRotationType textRotationType)
    Set text rotation of a cell.

    Parameters:
    textRotationType - new text rotation type.

    hashCode

    public int hashCode()
    Returns a hash code value for the object.

    Overrides:
    hashCode in class java.lang.Object

    equals

    public boolean equals(java.lang.Object obj)
    Indicates whether some other object is "equal to" this one.

    Overrides:
    equals in class java.lang.Object

    isShrinkToFit

    public boolean isShrinkToFit()
    Determines whether the text in the cell should be shrunk to fit the cell width. Not applicable when a cell contains multiple lines of text.


    setShrinkToFit

    public void setShrinkToFit(boolean shrinkToFit)
    Set whether the text in the cell should be shrunk to fit the cell width. Not applicable when a cell contains multiple lines of text.

    Parameters:
    shrinkToFit - true to shrink the text.

    isWrapText

    public boolean isWrapText()
    Determines whether the text should be wrapped in a cell.


    setWrapText

    public void setWrapText(boolean wrapText)
    Set whether the text should be wrapped in a cell.

    Parameters:
    wrapText - true to wrap the text.

    getId

    public CellStyleId getId()
    Get Id of this cell style.


    clone

    public CellStyle clone()
                    throws java.lang.CloneNotSupportedException
    Creates and returns a copy of this object.

    Overrides:
    clone in class java.lang.Object
    Throws:
    java.lang.CloneNotSupportedException