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
Modifier and TypeMethodDescriptionalignment(CellStyle.Alignment alignment) Sets horizontal alignment.Sets background color of a fill.borderBottom(CellStyle.BorderType borderType) Sets bottom border.borderBottomColor(Color color) Sets bottom border color.borderLeft(CellStyle.BorderType borderType) Sets left border.borderLeftColor(Color color) Sets left border color.borderRight(CellStyle.BorderType borderType) Sets right border.borderRightColor(Color color) Sets right border color.borderTop(CellStyle.BorderType borderType) Sets top border.borderTopColor(Color color) Sets top border color.build()Returns an immutable cell style object.dataFormat(String format) Sets the data formatSets foreground color of a fill.fillPattern(CellStyle.FillPattern pattern) Sets the fill/background pattern.fontBoldweight(Font.Boldweight boldweight) Sets the font bold style.Sets the font color.fontHeight(int height) Sets the font heightfontHeightInPoint(int point) Sets the font height in pointfontItalic(boolean italic) Sets if the font is italic.Sets the font name.fontStrikeout(boolean strikeout) Sets if the font is strikeout.fontUnderline(Font.Underline underline) Sets the font underline style.hidden(boolean hidden) Sets if the cell formula should be hidden.locked(boolean locked) Sets if the cell should be locked.rotation(int degree) Sets if the cell has rotation (KEIKAI-745)verticalAlignment(CellStyle.VerticalAlignment alignment) Sets vertical alignment.wrapText(boolean wraptext) Sets wrap text.
-
Method Details
-
fontName
Sets the font name.- Parameters:
name- font name, e.g. "Calibri"
-
fontColor
Sets the font color.- Parameters:
color- font color
-
fontBoldweight
Sets the font bold style.- Parameters:
boldweight- font bold weight
-
fontItalic
Sets if the font is italic.- Parameters:
italic- font italic
-
fontStrikeout
Sets if the font is strikeout.- Parameters:
strikeout- font strikeout
-
fontUnderline
Sets the font underline style.- Parameters:
underline- font underline
-
fontHeight
Sets the font height- Parameters:
height- font height
-
fontHeightInPoint
Sets the font height in point- Parameters:
point- font height in point
-
backColor
Sets background color of a fill.- Parameters:
color- background color
-
fillColor
Sets foreground color of a fill.- Parameters:
color- fill color
-
fillPattern
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
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
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
Sets wrap text.- Parameters:
wraptext- wrap text
-
borderLeft
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
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
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
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
Sets top border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)to create aColor- Parameters:
color- top border color
-
borderLeftColor
Sets left border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)to create aColor- Parameters:
color- left border color
-
borderBottomColor
Sets bottom border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)to create aColor- Parameters:
color- bottom border color
-
borderRightColor
Sets right border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)to create aColor- Parameters:
color- right border color
-
dataFormat
Sets the data format- Parameters:
format- data format
-
locked
Sets if the cell should be locked.- Parameters:
locked- cell locked
-
rotation
Sets if the cell has rotation (KEIKAI-745)- Parameters:
degree-- Since:
- 6.2.0
-
build
CellStyle build()Returns an immutable cell style object.
-