public interface CellStyle
To apply the style to a range, you have to invoke Range#applyCellStyle(CellStyle)
to trigger the UI client to change the styling. Otherwise, all the changes will
be queued in this object only.
Modifier and Type | Method and Description |
---|---|
Alignment |
createAlignment()
Creates a alignment.
|
Border |
createBorder()
Creates a border
|
Borders |
createBorders()
Creates a borders collection with four borders.(
Borders.BorderIndex.EdgeLeft ,
Borders.BorderIndex.EdgeTop , and Borders.BorderIndex.EdgeBottom ,
Borders.BorderIndex.EdgeRight ) |
Font |
createFont()
Creates a font.
|
NumberFormat |
createNumberFormat()
Creates a number format
|
Fill.PatternFill |
createPatternFill()
Creates a pattern fill.
|
Protection |
createProtection()
Creates a protection
|
Alignment |
getAlignment()
Returns the alignment
|
Border |
getBorder(Borders.BorderIndex borderIndex)
Returns the single border from the given border index.
|
Borders |
getBorders()
Returns the borders collection.
|
Fill |
getFill()
Returns the fill
|
Font |
getFont()
Returns the font
|
NumberFormat |
getNumberFormat()
Returns the number format.
|
Protection |
getProtection()
Returns the protection.
|
void |
setAlignment(Alignment alignment)
Sets the alignment
|
void |
setBorder(Borders.BorderIndex borderIndex,
Border border)
Sets the single border with the given border index
|
void |
setBorders(Borders borders)
Sets the borders collection, this will replace the existing borders, if any.
|
void |
setFill(Fill fill)
Sets the fill
|
void |
setFont(Font font)
Sets the font
|
void |
setNumberFormat(NumberFormat numberFormat)
Sets the number format.
|
void |
setPivotButton(boolean enable)
Sets to enable or disable the pivot button
|
void |
setProtection(Protection protection)
Sets the protection.
|
void |
setQuotePrefix(boolean enable)
Sets to enable or disable the quote prefix.
|
Font createFont()
Fill.PatternFill createPatternFill()
Alignment createAlignment()
Border createBorder()
Borders createBorders()
Borders.BorderIndex.EdgeLeft
,
Borders.BorderIndex.EdgeTop
, and Borders.BorderIndex.EdgeBottom
,
Borders.BorderIndex.EdgeRight
)NumberFormat createNumberFormat()
Protection createProtection()
void setQuotePrefix(boolean enable)
enable
- void setPivotButton(boolean enable)
enable
- void setFont(Font font)
font
- void setFill(Fill fill)
fill
- void setAlignment(Alignment alignment)
alignment
- void setBorder(Borders.BorderIndex borderIndex, Border border)
borderIndex
- either Borders.BorderIndex.EdgeLeft
,
Borders.BorderIndex.EdgeTop
, Borders.BorderIndex.EdgeBottom
,
Borders.BorderIndex.EdgeRight
, Borders.BorderIndex.DiagonalDown
,
Borders.BorderIndex.DiagonalUp
, Borders.BorderIndex.InsideVertical
,
or Borders.BorderIndex.InsideHorizontal
border
- void setBorders(Borders borders)
borders
- void setNumberFormat(NumberFormat numberFormat)
numberFormat
- void setProtection(Protection protection)
Font getFont()
Fill getFill()
Alignment getAlignment()
Border getBorder(Borders.BorderIndex borderIndex)
borderIndex
- either Borders.BorderIndex.EdgeLeft
,
Borders.BorderIndex.EdgeTop
, Borders.BorderIndex.EdgeBottom
,
Borders.BorderIndex.EdgeRight
, Borders.BorderIndex.DiagonalDown
,
Borders.BorderIndex.DiagonalUp
, Borders.BorderIndex.InsideVertical
,
or Borders.BorderIndex.InsideHorizontal
Borders getBorders()
NumberFormat getNumberFormat()
Protection getProtection()
Copyright © 2018. All rights reserved.