net.sf.jett.model
Class Style

java.lang.Object
  extended by net.sf.jett.model.Style

public class Style
extends java.lang.Object

A Style object holds desired properties and property values for later reference. If a property value is null, then that indicates NOT to override the current style value on a cell.

Since:
0.5.0
Author:
Randy Gettman

Constructor Summary
Style()
          Construct a Style with no style preferences.
 
Method Summary
 void apply(Style style)
          Applies the given Style to this Style, overwriting any properties in common.
 Alignment getAlignment()
          Returns the horizontal alignment.
 java.lang.String getBorderBottomColor()
          Returns the bottom border color, as a color name or a hex string.
 BorderType getBorderBottomType()
          Returns the bottom border type.
 java.lang.String getBorderLeftColor()
          Returns the left border color, as a color name or a hex string.
 BorderType getBorderLeftType()
          Returns the left border type.
 java.lang.String getBorderRightColor()
          Returns the right border color, as a color name or a hex string.
 BorderType getBorderRightType()
          Returns the right border type.
 java.lang.String getBorderTopColor()
          Returns the top border color, as a color name or a hex string.
 BorderType getBorderTopType()
          Returns the top border type.
 java.lang.Integer getColumnWidth()
          Returns the column width in number of characters.
 java.lang.String getDataFormat()
          Returns the data format string.
 java.lang.String getFillBackgroundColor()
          Returns the fill background color, as a color name or a hex string.
 java.lang.String getFillForegroundColor()
          Returns the fill foreground color, as a color name or a hex string.
 FillPattern getFillPatternType()
          Returns the fill pattern type.
 FontBoldweight getFontBoldweight()
          Returns the font boldweight.
 FontCharset getFontCharset()
          Returns the font charset.
 java.lang.String getFontColor()
          Returns the font color, either a color name or a hex string.
 java.lang.Short getFontHeightInPoints()
          Returns the font height in points.
 java.lang.String getFontName()
          Returns the font name.
 FontTypeOffset getFontTypeOffset()
          Returns the FontTypeOffset.
 FontUnderline getFontUnderline()
          Returns the FontUnderLine.
 java.lang.Short getIndention()
          Returns the number characters the text is indented.
 java.lang.Short getRotationDegrees()
          Returns the degrees the text is rotated.
 java.lang.Short getRowHeight()
          Sets the row height in points.
 VerticalAlignment getVerticalAlignment()
          Returns the vertical alignment.
 java.lang.Boolean isFontItalic()
          Returns whether the font is italic.
 java.lang.Boolean isFontStrikeout()
          Returns whether the font is strikeout.
 java.lang.Boolean isHidden()
          Returns whether the cell is "hidden".
 java.lang.Boolean isLocked()
          Returns whether the cell is "locked".
 boolean isStyleToApply()
          Returns whether there are styles to apply, i.e.
 java.lang.Boolean isWrappingText()
          Returns whether text is wrapped on to the next line.
 void setAlignment(Alignment alignment)
          Sets the horizontal alignment.
 void setBorderBottomColor(java.lang.String borderBottomColor)
          Sets the bottom border color, as a color name or a hex string.
 void setBorderBottomType(BorderType borderBottomType)
          Sets the bottom border type.
 void setBorderLeftColor(java.lang.String borderLeftColor)
          Sets the left border color, as a color name or a hex string.
 void setBorderLeftType(BorderType borderLeftType)
          Sets the left border type.
 void setBorderRightColor(java.lang.String borderRightColor)
          Sets the right border color, as a color name or a hex string.
 void setBorderRightType(BorderType borderRightType)
          Sets the right border type.
 void setBorderTopColor(java.lang.String borderTopColor)
          Sets the top border color, as a color name or a hex string.
 void setBorderTopType(BorderType borderTopType)
          Sets the top border type.
 void setColumnWidth(java.lang.Integer columnWidth)
          Sets the column width in number of characters.
 void setDataFormat(java.lang.String dataFormat)
          Sets the data format string.
 void setFillBackgroundColor(java.lang.String fillBackgroundColor)
          Sets the fill background color, as a color name or a hex string.
 void setFillForegroundColor(java.lang.String fillForegroundColor)
          Sets the fill foreground color, as a color name or a hex string.
 void setFillPatternType(FillPattern fillPatternType)
          Sets the fill pattern type.
 void setFontBoldweight(FontBoldweight fontBoldweight)
          Sets the font boldweight.
 void setFontCharset(FontCharset fontCharset)
          Returns the font charset.
 void setFontColor(java.lang.String fontColor)
          Sets the font color, either a color name or a hex string.
 void setFontHeightInPoints(java.lang.Short fontHeightInPoints)
          Sets the font height in points.
 void setFontItalic(java.lang.Boolean isFontItalic)
          Sets whether the font is italic.
 void setFontName(java.lang.String fontName)
          Sets the font name.
 void setFontStrikeout(java.lang.Boolean isFontStrikeout)
          Sets whether the font is strikeout.
 void setFontTypeOffset(FontTypeOffset fontTypeOffset)
          Sets the FontTypeOffset.
 void setFontUnderline(FontUnderline fontUnderline)
          Sets the FontUnderLine.
 void setHidden(java.lang.Boolean isHidden)
          Sets whether the cell is "hidden".
 void setIndention(java.lang.Short indention)
          Sets the number characters the text is indented.
 void setLocked(java.lang.Boolean isLocked)
          Sets whether the cell is "locked".
 void setRotationDegrees(java.lang.Short rotationDegrees)
          Sets the degrees the text is rotated.
 void setRowHeight(java.lang.Short rowHeight)
          Sets the row height in points.
 void setVerticalAlignment(VerticalAlignment verticalAlignment)
          Sets the vertical alignment.
 void setWrappingText(java.lang.Boolean isWrappingText)
          Sets whether text is wrapped on to the next line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Style

public Style()
Construct a Style with no style preferences.

Method Detail

getAlignment

public Alignment getAlignment()
Returns the horizontal alignment.

Returns:
The horizontal alignment.

setAlignment

public void setAlignment(Alignment alignment)
Sets the horizontal alignment.

Parameters:
alignment - The horizontal alignment.

getBorderBottomType

public BorderType getBorderBottomType()
Returns the bottom border type.

Returns:
The bottom border type.

setBorderBottomType

public void setBorderBottomType(BorderType borderBottomType)
Sets the bottom border type.

Parameters:
borderBottomType - The bottom border type.

getBorderLeftType

public BorderType getBorderLeftType()
Returns the left border type.

Returns:
The left border type.

setBorderLeftType

public void setBorderLeftType(BorderType borderLeftType)
Sets the left border type.

Parameters:
borderLeftType - The left border type.

getBorderRightType

public BorderType getBorderRightType()
Returns the right border type.

Returns:
The right border type.

setBorderRightType

public void setBorderRightType(BorderType borderRightType)
Sets the right border type.

Parameters:
borderRightType - The right border type.

getBorderTopType

public BorderType getBorderTopType()
Returns the top border type.

Returns:
The top border type.

setBorderTopType

public void setBorderTopType(BorderType borderTopType)
Sets the top border type.

Parameters:
borderTopType - The top border type.

getBorderBottomColor

public java.lang.String getBorderBottomColor()
Returns the bottom border color, as a color name or a hex string.

Returns:
The bottom border color, as a color name or a hex string.

setBorderBottomColor

public void setBorderBottomColor(java.lang.String borderBottomColor)
Sets the bottom border color, as a color name or a hex string.

Parameters:
borderBottomColor - The bottom border color, as a color name or a hex string.

getBorderLeftColor

public java.lang.String getBorderLeftColor()
Returns the left border color, as a color name or a hex string.

Returns:
The left border color, as a color name or a hex string.

setBorderLeftColor

public void setBorderLeftColor(java.lang.String borderLeftColor)
Sets the left border color, as a color name or a hex string.

Parameters:
borderLeftColor - The left border color, as a color name or a hex string.

getBorderRightColor

public java.lang.String getBorderRightColor()
Returns the right border color, as a color name or a hex string.

Returns:
The right border color, as a color name or a hex string.

setBorderRightColor

public void setBorderRightColor(java.lang.String borderRightColor)
Sets the right border color, as a color name or a hex string.

Parameters:
borderRightColor - The right border color, as a color name or a hex string.

getBorderTopColor

public java.lang.String getBorderTopColor()
Returns the top border color, as a color name or a hex string.

Returns:
The top border color, as a color name or a hex string.

setBorderTopColor

public void setBorderTopColor(java.lang.String borderTopColor)
Sets the top border color, as a color name or a hex string.

Parameters:
borderTopColor - The top border color, as a color name or a hex string.

getColumnWidth

public java.lang.Integer getColumnWidth()
Returns the column width in number of characters.

Returns:
The column width in number of characters.

setColumnWidth

public void setColumnWidth(java.lang.Integer columnWidth)
Sets the column width in number of characters.

Parameters:
columnWidth - The column width in number of characters.

getDataFormat

public java.lang.String getDataFormat()
Returns the data format string.

Returns:
The data format string.

setDataFormat

public void setDataFormat(java.lang.String dataFormat)
Sets the data format string.

Parameters:
dataFormat - The data format string.

getFillBackgroundColor

public java.lang.String getFillBackgroundColor()
Returns the fill background color, as a color name or a hex string.

Returns:
The fill background color, as a color name or a hex string.

setFillBackgroundColor

public void setFillBackgroundColor(java.lang.String fillBackgroundColor)
Sets the fill background color, as a color name or a hex string.

Parameters:
fillBackgroundColor - The fill background color, as a color name or a hex string.

getFillForegroundColor

public java.lang.String getFillForegroundColor()
Returns the fill foreground color, as a color name or a hex string.

Returns:
The fill foreground color, as a color name or a hex string.

setFillForegroundColor

public void setFillForegroundColor(java.lang.String fillForegroundColor)
Sets the fill foreground color, as a color name or a hex string.

Parameters:
fillForegroundColor - The fill foreground color, as a color name or a hex string.

getFillPatternType

public FillPattern getFillPatternType()
Returns the fill pattern type.

Returns:
The fill pattern type.

setFillPatternType

public void setFillPatternType(FillPattern fillPatternType)
Sets the fill pattern type.

Parameters:
fillPatternType - The fill pattern type.

isHidden

public java.lang.Boolean isHidden()
Returns whether the cell is "hidden".

Returns:
Whether the cell is "hidden".

setHidden

public void setHidden(java.lang.Boolean isHidden)
Sets whether the cell is "hidden".

Parameters:
isHidden - Whether the cell is "hidden".

getIndention

public java.lang.Short getIndention()
Returns the number characters the text is indented.

Returns:
The number characters the text is indented.

setIndention

public void setIndention(java.lang.Short indention)
Sets the number characters the text is indented.

Parameters:
indention - The number characters the text is indented.

isLocked

public java.lang.Boolean isLocked()
Returns whether the cell is "locked".

Returns:
Whether the cell is "locked".

setLocked

public void setLocked(java.lang.Boolean isLocked)
Sets whether the cell is "locked".

Parameters:
isLocked - Whether the cell is "locked".

getRotationDegrees

public java.lang.Short getRotationDegrees()
Returns the degrees the text is rotated.

Returns:
The degrees the text is rotated.

setRotationDegrees

public void setRotationDegrees(java.lang.Short rotationDegrees)
Sets the degrees the text is rotated.

Parameters:
rotationDegrees - The degrees the text is rotated.

getRowHeight

public java.lang.Short getRowHeight()
Sets the row height in points.

Returns:
The row height in points.

setRowHeight

public void setRowHeight(java.lang.Short rowHeight)
Sets the row height in points.

Parameters:
rowHeight - The row height in points.

getVerticalAlignment

public VerticalAlignment getVerticalAlignment()
Returns the vertical alignment.

Returns:
The vertical alignment.

setVerticalAlignment

public void setVerticalAlignment(VerticalAlignment verticalAlignment)
Sets the vertical alignment.

Parameters:
verticalAlignment - The vertical alignment.

isWrappingText

public java.lang.Boolean isWrappingText()
Returns whether text is wrapped on to the next line.

Returns:
Whether text is wrapped on to the next line.

setWrappingText

public void setWrappingText(java.lang.Boolean isWrappingText)
Sets whether text is wrapped on to the next line.

Parameters:
isWrappingText - Whether text is wrapped on to the next line.

getFontBoldweight

public FontBoldweight getFontBoldweight()
Returns the font boldweight.

Returns:
The font boldweight.

setFontBoldweight

public void setFontBoldweight(FontBoldweight fontBoldweight)
Sets the font boldweight.

Parameters:
fontBoldweight - The font boldweight.

getFontCharset

public FontCharset getFontCharset()
Returns the font charset.

Returns:
The font charset.

setFontCharset

public void setFontCharset(FontCharset fontCharset)
Returns the font charset.

Parameters:
fontCharset - The font charset.

getFontColor

public java.lang.String getFontColor()
Returns the font color, either a color name or a hex string.

Returns:
The font color, either a color name or a hex string.

setFontColor

public void setFontColor(java.lang.String fontColor)
Sets the font color, either a color name or a hex string.

Parameters:
fontColor - The font color, either a color name or a hex string.

getFontHeightInPoints

public java.lang.Short getFontHeightInPoints()
Returns the font height in points.

Returns:
The font height in points.

setFontHeightInPoints

public void setFontHeightInPoints(java.lang.Short fontHeightInPoints)
Sets the font height in points.

Parameters:
fontHeightInPoints - The font height in points.

getFontName

public java.lang.String getFontName()
Returns the font name.

Returns:
The font name.

setFontName

public void setFontName(java.lang.String fontName)
Sets the font name.

Parameters:
fontName - The font name.

isFontItalic

public java.lang.Boolean isFontItalic()
Returns whether the font is italic.

Returns:
Whether the font is italic.

setFontItalic

public void setFontItalic(java.lang.Boolean isFontItalic)
Sets whether the font is italic.

Parameters:
isFontItalic - Whether the font is italic.

isFontStrikeout

public java.lang.Boolean isFontStrikeout()
Returns whether the font is strikeout.

Returns:
Whether the font is strikeout.

setFontStrikeout

public void setFontStrikeout(java.lang.Boolean isFontStrikeout)
Sets whether the font is strikeout.

Parameters:
isFontStrikeout - Whether the font is strikeout.

getFontTypeOffset

public FontTypeOffset getFontTypeOffset()
Returns the FontTypeOffset.

Returns:
The FontTypeOffset.

setFontTypeOffset

public void setFontTypeOffset(FontTypeOffset fontTypeOffset)
Sets the FontTypeOffset.

Parameters:
fontTypeOffset - The FontTypeOffset.

getFontUnderline

public FontUnderline getFontUnderline()
Returns the FontUnderLine.

Returns:
The FontUnderLine.

setFontUnderline

public void setFontUnderline(FontUnderline fontUnderline)
Sets the FontUnderLine.

Parameters:
fontUnderline - The FontUnderLine.

isStyleToApply

public boolean isStyleToApply()
Returns whether there are styles to apply, i.e. whether any styles are set.

Returns:
Whether there are styles to apply.

apply

public void apply(Style style)
Applies the given Style to this Style, overwriting any properties in common.

Parameters:
style - Another Style.


Copyright © 2012-2013 Jett Team. All Rights Reserved.