public interface CellStyle
Modifier and Type | Method and Description |
---|---|
void |
cloneStyleFrom(CellStyle source)
Clones all the style information from another
CellStyle, onto this one.
|
HorizontalAlignment |
getAlignment()
get the type of horizontal alignment for the cell
|
HorizontalAlignment |
getAlignmentEnum()
Deprecated.
use
getAlignment() instead |
BorderStyle |
getBorderBottom()
get the type of border to use for the bottom border of the cell
|
BorderStyle |
getBorderBottomEnum()
Deprecated.
use
getBorderBottom() instead |
BorderStyle |
getBorderLeft()
get the type of border to use for the left border of the cell
|
BorderStyle |
getBorderLeftEnum()
Deprecated.
use
getBorderLeft() instead |
BorderStyle |
getBorderRight()
get the type of border to use for the right border of the cell
|
BorderStyle |
getBorderRightEnum()
Deprecated.
use
getBorderRight() instead |
BorderStyle |
getBorderTop()
get the type of border to use for the top border of the cell
|
BorderStyle |
getBorderTopEnum()
Deprecated.
use
getBorderTop() instead |
short |
getBottomBorderColor()
get the color to use for the left border
|
short |
getDataFormat()
get the index of the data format.
|
java.lang.String |
getDataFormatString()
Get the format string
|
short |
getFillBackgroundColor()
get the background fill color, if the fill
is defined with an indexed color.
|
Color |
getFillBackgroundColorColor()
Gets the color object representing the current
background fill, resolving indexes using
the supplied workbook.
|
short |
getFillForegroundColor()
get the foreground fill color, if the fill
is defined with an indexed color.
|
Color |
getFillForegroundColorColor()
Gets the color object representing the current
foreground fill, resolving indexes using
the supplied workbook.
|
FillPatternType |
getFillPattern()
Get the fill pattern
|
FillPatternType |
getFillPatternEnum()
Deprecated.
use
getFillPattern() instead |
short |
getFontIndex()
Deprecated.
use
getFontIndexAsInt() instead |
int |
getFontIndexAsInt()
gets the index of the font for this style
|
boolean |
getHidden()
get whether the cell's using this style are to be hidden
|
short |
getIndention()
get the number of spaces to indent the text in the cell
|
short |
getIndex()
get the index within the Workbook (sequence within the collection of ExtnededFormat objects)
|
short |
getLeftBorderColor()
get the color to use for the left border
|
boolean |
getLocked()
get whether the cell's using this style are to be locked
|
boolean |
getQuotePrefixed()
Is "Quote Prefix" or "123 Prefix" enabled for the cell?
Having this on is somewhat (but not completely, see
IgnoredErrorType )
like prefixing the cell value with a ' in Excel |
short |
getRightBorderColor()
get the color to use for the left border
|
short |
getRotation()
get the degree of rotation for the text in the cell.
|
boolean |
getShrinkToFit()
Should the Cell be auto-sized by Excel to shrink
it to fit if this text is too long?
|
short |
getTopBorderColor()
get the color to use for the top border
|
VerticalAlignment |
getVerticalAlignment()
get the type of vertical alignment for the cell
|
VerticalAlignment |
getVerticalAlignmentEnum()
Deprecated.
use
getVerticalAlignment() instead |
boolean |
getWrapText()
get whether the text should be wrapped
|
void |
setAlignment(HorizontalAlignment align)
set the type of horizontal alignment for the cell
|
void |
setBorderBottom(BorderStyle border)
set the type of border to use for the bottom border of the cell
|
void |
setBorderLeft(BorderStyle border)
set the type of border to use for the left border of the cell
|
void |
setBorderRight(BorderStyle border)
set the type of border to use for the right border of the cell
|
void |
setBorderTop(BorderStyle border)
set the type of border to use for the top border of the cell
|
void |
setBottomBorderColor(short color)
set the color to use for the bottom border
|
void |
setDataFormat(short fmt)
set the data format (must be a valid format).
|
void |
setFillBackgroundColor(short bg)
set the background fill color.
|
void |
setFillForegroundColor(short bg)
set the foreground fill color
Note: Ensure Foreground color is set prior to background color.
|
void |
setFillPattern(FillPatternType fp)
setting to one fills the cell with the foreground color...
|
void |
setFont(Font font)
set the font for this style
|
void |
setHidden(boolean hidden)
set the cell's using this style to be hidden
|
void |
setIndention(short indent)
set the number of spaces to indent the text in the cell
|
void |
setLeftBorderColor(short color)
set the color to use for the left border
|
void |
setLocked(boolean locked)
set the cell's using this style to be locked
|
void |
setQuotePrefixed(boolean quotePrefix)
Turn on or off "Quote Prefix" or "123 Prefix" for the style,
which is used to tell Excel that the thing which looks like
a number or a formula shouldn't be treated as on.
|
void |
setRightBorderColor(short color)
set the color to use for the right border
|
void |
setRotation(short rotation)
set the degree of rotation for the text in the cell.
|
void |
setShrinkToFit(boolean shrinkToFit)
Controls if the Cell should be auto-sized
to shrink to fit if the text is too long
|
void |
setTopBorderColor(short color)
set the color to use for the top border
|
void |
setVerticalAlignment(VerticalAlignment align)
set the type of vertical alignment for the cell
|
void |
setWrapText(boolean wrapped)
Set whether the text should be wrapped.
|
short getIndex()
void setDataFormat(short fmt)
BuiltinFormats
.DataFormat
short getDataFormat()
BuiltinFormats
.DataFormat
java.lang.String getDataFormatString()
void setFont(Font font)
font
- a font object created or retrieved from the Workbook objectWorkbook.createFont()
,
Workbook.getFontAt(int)
@Removal(version="4.2") short getFontIndex()
getFontIndexAsInt()
insteadWorkbook.getFontAt(short)
int getFontIndexAsInt()
Workbook.getFontAt(int)
void setHidden(boolean hidden)
hidden
- - whether the cell using this style should be hiddenboolean getHidden()
void setLocked(boolean locked)
locked
- - whether the cell using this style should be lockedboolean getLocked()
void setQuotePrefixed(boolean quotePrefix)
IgnoredErrorType
)
like prefixing the cell value with a ' in Excelboolean getQuotePrefixed()
IgnoredErrorType
)
like prefixing the cell value with a ' in Excelvoid setAlignment(HorizontalAlignment align)
align
- - the type of alignmentHorizontalAlignment getAlignment()
@Removal(version="4.2") @Deprecated HorizontalAlignment getAlignmentEnum()
getAlignment()
insteadvoid setWrapText(boolean wrapped)
true
make all content visible
within a cell by displaying it on multiple lineswrapped
- wrap text or notboolean getWrapText()
void setVerticalAlignment(VerticalAlignment align)
align
- the type of alignmentVerticalAlignment getVerticalAlignment()
@Removal(version="4.2") @Deprecated VerticalAlignment getVerticalAlignmentEnum()
getVerticalAlignment()
insteadvoid setRotation(short rotation)
rotation
- degrees (see note above)short getRotation()
void setIndention(short indent)
indent
- - number of spacesshort getIndention()
void setBorderLeft(BorderStyle border)
border
- typeBorderStyle getBorderLeft()
@Removal(version="4.2") @Deprecated BorderStyle getBorderLeftEnum()
getBorderLeft()
insteadvoid setBorderRight(BorderStyle border)
border
- typeBorderStyle getBorderRight()
@Removal(version="4.2") @Deprecated BorderStyle getBorderRightEnum()
getBorderRight()
insteadvoid setBorderTop(BorderStyle border)
border
- typeBorderStyle getBorderTop()
@Removal(version="4.2") @Deprecated BorderStyle getBorderTopEnum()
getBorderTop()
insteadvoid setBorderBottom(BorderStyle border)
border
- typeBorderStyle getBorderBottom()
@Removal(version="4.2") @Deprecated BorderStyle getBorderBottomEnum()
getBorderBottom()
insteadvoid setLeftBorderColor(short color)
color
- The index of the color definitionshort getLeftBorderColor()
void setRightBorderColor(short color)
color
- The index of the color definitionshort getRightBorderColor()
void setTopBorderColor(short color)
color
- The index of the color definitionshort getTopBorderColor()
void setBottomBorderColor(short color)
color
- The index of the color definitionshort getBottomBorderColor()
void setFillPattern(FillPatternType fp)
fp
- fill pattern (set to FillPatternType.SOLID_FOREGROUND
to fill w/foreground color)FillPatternType getFillPattern()
FillPatternType.NO_FILL
@Removal(version="4.2") @Deprecated FillPatternType getFillPatternEnum()
getFillPattern()
insteadFillPatternType.NO_FILL
void setFillBackgroundColor(short bg)
bg
- colorshort getFillBackgroundColor()
Color getFillBackgroundColorColor()
void setFillForegroundColor(short bg)
bg
- colorshort getFillForegroundColor()
Color getFillForegroundColorColor()
void cloneStyleFrom(CellStyle source)
void setShrinkToFit(boolean shrinkToFit)
boolean getShrinkToFit()
Copyright 2018 The Apache Software Foundation or its licensors, as applicable.