com.arctorus.documents.table
Class CellStyleManager

java.lang.Object
  extended by com.arctorus.documents.table.CellStyleManager

public final class CellStyleManager
extends java.lang.Object

Class for managing collection of cell styles.


Method Summary
 CellStyle createCellStyle(FillFormat fillFormat)
          Creates NEW cell style with the specified fill format.
 CellStyle createCellStyle(FillFormat fillFormat, HorizontalAlignmentType horizontalAlignment, VerticalAlignmentType verticalAlignment)
          Creates NEW cell style with the specified fill format, vertical and horizontal alignment.
 CellStyle createCellStyle(FillFormat fillFormat, HorizontalAlignmentType horizontalAlignment, VerticalAlignmentType verticalAlignment, boolean shrinkToFit, boolean wrapText, TextRotationType textRotationType)
          Creates NEW cell style with the specified parameters.
static CellStyleManager createInternalInstance()
          Internal method for creating style manager.
 CellStyle findCellStyle(FillFormat fillFormat, HorizontalAlignmentType horizontalAlignment, VerticalAlignmentType verticalAlignment, boolean shrinkToFit, boolean wrapText)
          Returns existing cell style with the specified parameters and TextRotationType.DEFAULT.
 CellStyle findCellStyle(FillFormat fillFormat, HorizontalAlignmentType horizontalAlignment, VerticalAlignmentType verticalAlignment, boolean shrinkToFit, boolean wrapText, TextRotationType textRotationType)
          Returns existing cell style with the specified parameters.
 CellStyle getCellStyle(CellStyleId cellStyleId)
          Get existing cell style by id.
 java.util.List<CellStyle> getCellStyleList()
          Get full collection of cell styles.
 CellStyle getDefaultCellStyle()
          Get default cell style.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createInternalInstance

public static final CellStyleManager createInternalInstance()
Internal method for creating style manager. Please don't call it directly.


getCellStyle

public CellStyle getCellStyle(CellStyleId cellStyleId)
Get existing cell style by id.

Parameters:
cellStyleId - id of a cell style to get.
Returns:
cell style with the specified id or null if style doesn't exist.

createCellStyle

public CellStyle createCellStyle(FillFormat fillFormat,
                                 HorizontalAlignmentType horizontalAlignment,
                                 VerticalAlignmentType verticalAlignment)
Creates NEW cell style with the specified fill format, vertical and horizontal alignment.

Parameters:
fillFormat - fill format of a cell style.
horizontalAlignment - horizontal alignment.
verticalAlignment - vertical alignment.
Returns:
new created cell style.

createCellStyle

public CellStyle createCellStyle(FillFormat fillFormat)
Creates NEW cell style with the specified fill format.

Parameters:
fillFormat - fill format of a cell style.
Returns:
new created cell style.

createCellStyle

public CellStyle createCellStyle(FillFormat fillFormat,
                                 HorizontalAlignmentType horizontalAlignment,
                                 VerticalAlignmentType verticalAlignment,
                                 boolean shrinkToFit,
                                 boolean wrapText,
                                 TextRotationType textRotationType)
Creates NEW cell style with the specified parameters.

Parameters:
fillFormat - fill format of a cell style.
horizontalAlignment - horizontal alignment.
verticalAlignment - vertical alignment.
shrinkToFit - determines whether to shrink a text.
wrapText - determines whether to wrap a text.
textRotationType - determines whether to rotate a text.
Returns:
new created cell style.

findCellStyle

public CellStyle findCellStyle(FillFormat fillFormat,
                               HorizontalAlignmentType horizontalAlignment,
                               VerticalAlignmentType verticalAlignment,
                               boolean shrinkToFit,
                               boolean wrapText)
Returns existing cell style with the specified parameters and TextRotationType.DEFAULT. If style doesn't exist then new style will be created.

Parameters:
fillFormat - fill format of a cell style.
horizontalAlignment - horizontal alignment.
verticalAlignment - vertical alignment.
shrinkToFit - determines whether to shrink the text.
wrapText - determines whether to wrap the text.
Returns:
created or existing cell style with the specified parameters.

findCellStyle

public CellStyle findCellStyle(FillFormat fillFormat,
                               HorizontalAlignmentType horizontalAlignment,
                               VerticalAlignmentType verticalAlignment,
                               boolean shrinkToFit,
                               boolean wrapText,
                               TextRotationType textRotationType)
Returns existing cell style with the specified parameters. If style doesn't exist then new style will be created.

Parameters:
fillFormat - fill format of a cell style.
horizontalAlignment - horizontal alignment.
verticalAlignment - vertical alignment.
shrinkToFit - determines whether to shrink the text.
wrapText - determines whether to wrap the text.
textRotationType - determines whether to rotate the text in cell.
Returns:
created or existing cell style with the specified parameters.

getDefaultCellStyle

public CellStyle getDefaultCellStyle()
Get default cell style.


getCellStyleList

public java.util.List<CellStyle> getCellStyleList()
Get full collection of cell styles.