Package io.keikai.api.model
Interface CellStyle.Builder
-
- All Known Implementing Classes:
CellStyleBuilderImpl
- Enclosing interface:
- CellStyle
public static interface CellStyle.BuilderCell 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.Builderalignment(CellStyle.Alignment alignment)Sets horizontal alignment.CellStyle.BuilderbackColor(Color color)Sets background color of a fill.CellStyle.BuilderborderBottom(CellStyle.BorderType borderType)Sets bottom border.CellStyle.BuilderborderBottomColor(Color color)Sets bottom border color.CellStyle.BuilderborderLeft(CellStyle.BorderType borderType)Sets left border.CellStyle.BuilderborderLeftColor(Color color)Sets left border color.CellStyle.BuilderborderRight(CellStyle.BorderType borderType)Sets right border.CellStyle.BuilderborderRightColor(Color color)Sets right border color.CellStyle.BuilderborderTop(CellStyle.BorderType borderType)Sets top border.CellStyle.BuilderborderTopColor(Color color)Sets top border color.CellStylebuild()Returns an immutable cell style object.CellStyle.BuilderdataFormat(String format)Sets the data formatCellStyle.BuilderfillColor(Color color)Sets foreground color of a fill.CellStyle.BuilderfillPattern(CellStyle.FillPattern pattern)Sets the fill/background pattern.CellStyle.BuilderfontBoldweight(Font.Boldweight boldweight)Sets the font bold style.CellStyle.BuilderfontColor(Color color)Sets the font color.CellStyle.BuilderfontHeight(int height)Sets the font heightCellStyle.BuilderfontHeightInPoint(int point)Sets the font height in pointCellStyle.BuilderfontItalic(boolean italic)Sets if the font is italic.CellStyle.BuilderfontName(String name)Sets the font name.CellStyle.BuilderfontStrikeout(boolean strikeout)Sets if the font is strikeout.CellStyle.BuilderfontUnderline(Font.Underline underline)Sets the font underline style.CellStyle.Builderhidden(boolean hidden)Sets if the cell formula should be hidden.CellStyle.Builderlocked(boolean locked)Sets if the cell should be locked.CellStyle.BuilderverticalAlignment(CellStyle.VerticalAlignment alignment)Sets vertical alignment.CellStyle.BuilderwrapText(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.NONEandCellStyle.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_SELECTIONwill 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.DOTTEDandCellStyle.BorderType.HAIR, (CellStyle.BorderType.DASH_DOTwill 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.DOTTEDandCellStyle.BorderType.HAIR, (CellStyle.BorderType.DASH_DOTwill 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.DOTTEDandCellStyle.BorderType.HAIR, (CellStyle.BorderType.DASH_DOTwill 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.DOTTEDandCellStyle.BorderType.HAIR, (CellStyle.BorderType.DASH_DOTwill 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.
-
-