Package io.keikai.api.model
Interface CellStyle.Builder
-
- All Known Implementing Classes:
CellStyleBuilderImpl
- Enclosing interface:
- CellStyle
public static interface CellStyle.Builder
Cell style builder to create the cell style- Since:
- 5.3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CellStyle.Builder
alignment(CellStyle.Alignment alignment)
Sets horizontal alignment.CellStyle.Builder
backColor(Color color)
Sets background color of a fill.CellStyle.Builder
borderBottom(CellStyle.BorderType borderType)
Sets bottom border.CellStyle.Builder
borderBottomColor(Color color)
Sets bottom border color.CellStyle.Builder
borderLeft(CellStyle.BorderType borderType)
Sets left border.CellStyle.Builder
borderLeftColor(Color color)
Sets left border color.CellStyle.Builder
borderRight(CellStyle.BorderType borderType)
Sets right border.CellStyle.Builder
borderRightColor(Color color)
Sets right border color.CellStyle.Builder
borderTop(CellStyle.BorderType borderType)
Sets top border.CellStyle.Builder
borderTopColor(Color color)
Sets top border color.CellStyle
build()
Returns an immutable cell style object.CellStyle.Builder
dataFormat(String format)
Sets the data formatCellStyle.Builder
fillColor(Color color)
Sets foreground color of a fill.CellStyle.Builder
fillPattern(CellStyle.FillPattern pattern)
Sets the fill/background pattern.CellStyle.Builder
fontBoldweight(Font.Boldweight boldweight)
Sets the font bold style.CellStyle.Builder
fontColor(Color color)
Sets the font color.CellStyle.Builder
fontHeight(int height)
Sets the font heightCellStyle.Builder
fontHeightInPoint(int point)
Sets the font height in pointCellStyle.Builder
fontItalic(boolean italic)
Sets if the font is italic.CellStyle.Builder
fontName(String name)
Sets the font name.CellStyle.Builder
fontStrikeout(boolean strikeout)
Sets if the font is strikeout.CellStyle.Builder
fontUnderline(Font.Underline underline)
Sets the font underline style.CellStyle.Builder
hidden(boolean hidden)
Sets if the cell formula should be hidden.CellStyle.Builder
locked(boolean locked)
Sets if the cell should be locked.CellStyle.Builder
verticalAlignment(CellStyle.VerticalAlignment alignment)
Sets vertical alignment.CellStyle.Builder
wrapText(boolean wraptext)
Sets wrap text.
-
-
-
Method Detail
-
fontName
CellStyle.Builder fontName(String name)
Sets the font name.- Parameters:
name
- font name, e.g. "Calibri"
-
fontColor
CellStyle.Builder fontColor(Color color)
Sets the font color.- Parameters:
color
- font color
-
fontBoldweight
CellStyle.Builder fontBoldweight(Font.Boldweight boldweight)
Sets the font bold style.- Parameters:
boldweight
- font bold weight
-
fontItalic
CellStyle.Builder fontItalic(boolean italic)
Sets if the font is italic.- Parameters:
italic
- font italic
-
fontStrikeout
CellStyle.Builder fontStrikeout(boolean strikeout)
Sets if the font is strikeout.- Parameters:
strikeout
- font strikeout
-
fontUnderline
CellStyle.Builder fontUnderline(Font.Underline underline)
Sets the font underline style.- Parameters:
underline
- font underline
-
fontHeight
CellStyle.Builder fontHeight(int height)
Sets the font height- Parameters:
height
- font height
-
fontHeightInPoint
CellStyle.Builder fontHeightInPoint(int point)
Sets the font height in point- Parameters:
point
- font height in point
-
backColor
CellStyle.Builder backColor(Color color)
Sets background color of a fill.- Parameters:
color
- background color
-
fillColor
CellStyle.Builder fillColor(Color color)
Sets foreground color of a fill.- Parameters:
color
- fill color
-
fillPattern
CellStyle.Builder fillPattern(CellStyle.FillPattern pattern)
Sets the fill/background pattern. Note: Spreadsheet (UI display) supports onlyCellStyle.FillPattern.NONE
andCellStyle.FillPattern.SOLID
(Other pattern will be display as {@link FillPattern#SOLID), However you can still set another pattern, the data will still be kept when export.- Parameters:
pattern
- fill pattern
-
alignment
CellStyle.Builder alignment(CellStyle.Alignment alignment)
Sets horizontal alignment. Note: Spreadsheet(UI display) supports onlyCellStyle.Alignment.LEFT
,CellStyle.Alignment.CENTER
,CellStyle.Alignment.RIGHT
(CellStyle.Alignment.CENTER_SELECTION
will be display asCellStyle.Alignment.CENTER
, Other alignment will be display asCellStyle.Alignment.LEFT
), However you can still set another alignment, the data will still be kept when export.- Parameters:
alignment
- cell horizontal alignment
-
verticalAlignment
CellStyle.Builder verticalAlignment(CellStyle.VerticalAlignment alignment)
Sets vertical alignment. Note: Spreadsheet(UI display) supports onlyCellStyle.VerticalAlignment.TOP
,CellStyle.VerticalAlignment.CENTER
,CellStyle.VerticalAlignment.TOP
, (Other alignment will be display asCellStyle.VerticalAlignment.BOTTOM
),- Parameters:
alignment
- cell vertical alignment
-
wrapText
CellStyle.Builder wrapText(boolean wraptext)
Sets wrap text.- Parameters:
wraptext
- wrap text
-
borderLeft
CellStyle.Builder borderLeft(CellStyle.BorderType borderType)
Sets left border. Note: Spreadsheet(UI display) only supportsCellStyle.BorderType.NONE
,CellStyle.BorderType.THIN
,CellStyle.BorderType.DOTTED
andCellStyle.BorderType.HAIR
, (CellStyle.BorderType.DASH_DOT
will be display asCellStyle.BorderType.DOTTED
, Other type will be display asCellStyle.BorderType.THIN
), However you can still set another border type, the data will still be kept when export.- Parameters:
borderType
- left border type
-
borderTop
CellStyle.Builder borderTop(CellStyle.BorderType borderType)
Sets top border. Note: Spreadsheet(UI display) only supportsCellStyle.BorderType.NONE
,CellStyle.BorderType.THIN
,CellStyle.BorderType.DOTTED
andCellStyle.BorderType.HAIR
, (CellStyle.BorderType.DASH_DOT
will be display asCellStyle.BorderType.DOTTED
, Other type will be display asCellStyle.BorderType.THIN
), However you can still set another border type, the data will still be kept when export.- Parameters:
borderType
- top border type
-
borderRight
CellStyle.Builder borderRight(CellStyle.BorderType borderType)
Sets right border. Note: Spreadsheet(UI display) only supportsCellStyle.BorderType.NONE
,CellStyle.BorderType.THIN
,CellStyle.BorderType.DOTTED
andCellStyle.BorderType.HAIR
, (CellStyle.BorderType.DASH_DOT
will be display asCellStyle.BorderType.DOTTED
, Other type will be display asCellStyle.BorderType.THIN
), However you can still set another border type, the data will still be kept when export.- Parameters:
borderType
- right border type
-
borderBottom
CellStyle.Builder borderBottom(CellStyle.BorderType borderType)
Sets bottom border. Note: Spreadsheet(UI display) only supportsCellStyle.BorderType.NONE
,CellStyle.BorderType.THIN
,CellStyle.BorderType.DOTTED
andCellStyle.BorderType.HAIR
, (CellStyle.BorderType.DASH_DOT
will be display asCellStyle.BorderType.DOTTED
, Other type will be display asCellStyle.BorderType.THIN
), However you can still set another border type, the data will still be kept when export.- Parameters:
borderType
- bottom border type
-
borderTopColor
CellStyle.Builder borderTopColor(Color color)
Sets top border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)
to create aColor
- Parameters:
color
- top border color
-
borderLeftColor
CellStyle.Builder borderLeftColor(Color color)
Sets left border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)
to create aColor
- Parameters:
color
- left border color
-
borderBottomColor
CellStyle.Builder borderBottomColor(Color color)
Sets bottom border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)
to create aColor
- Parameters:
color
- bottom border color
-
borderRightColor
CellStyle.Builder borderRightColor(Color color)
Sets right border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)
to create aColor
- Parameters:
color
- right border color
-
dataFormat
CellStyle.Builder dataFormat(String format)
Sets the data format- Parameters:
format
- data format
-
locked
CellStyle.Builder locked(boolean locked)
Sets if the cell should be locked.- Parameters:
locked
- cell locked
-
hidden
CellStyle.Builder hidden(boolean hidden)
Sets if the cell formula should be hidden.- Parameters:
hidden
- cell formula hidden
-
build
CellStyle build()
Returns an immutable cell style object.
-
-