Package io.keikai.api.model.impl
Class CellStyleBuilderImpl
- java.lang.Object
-
- io.keikai.api.model.impl.CellStyleBuilderImpl
-
- All Implemented Interfaces:
CellStyle.Builder
,Serializable
public class CellStyleBuilderImpl extends Object implements CellStyle.Builder, Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CellStyleBuilderImpl(SBook book, SCellStyle src)
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Constructor Detail
-
CellStyleBuilderImpl
public CellStyleBuilderImpl(SBook book, SCellStyle src)
-
-
Method Detail
-
fontName
public CellStyle.Builder fontName(String name)
Description copied from interface:CellStyle.Builder
Sets the font name.- Specified by:
fontName
in interfaceCellStyle.Builder
- Parameters:
name
- font name, e.g. "Calibri"
-
fontColor
public CellStyle.Builder fontColor(Color color)
Description copied from interface:CellStyle.Builder
Sets the font color.- Specified by:
fontColor
in interfaceCellStyle.Builder
- Parameters:
color
- font color
-
fontBoldweight
public CellStyle.Builder fontBoldweight(Font.Boldweight boldweight)
Description copied from interface:CellStyle.Builder
Sets the font bold style.- Specified by:
fontBoldweight
in interfaceCellStyle.Builder
- Parameters:
boldweight
- font bold weight
-
fontItalic
public CellStyle.Builder fontItalic(boolean italic)
Description copied from interface:CellStyle.Builder
Sets if the font is italic.- Specified by:
fontItalic
in interfaceCellStyle.Builder
- Parameters:
italic
- font italic
-
fontStrikeout
public CellStyle.Builder fontStrikeout(boolean strikeout)
Description copied from interface:CellStyle.Builder
Sets if the font is strikeout.- Specified by:
fontStrikeout
in interfaceCellStyle.Builder
- Parameters:
strikeout
- font strikeout
-
fontUnderline
public CellStyle.Builder fontUnderline(Font.Underline underline)
Description copied from interface:CellStyle.Builder
Sets the font underline style.- Specified by:
fontUnderline
in interfaceCellStyle.Builder
- Parameters:
underline
- font underline
-
fontHeight
public CellStyle.Builder fontHeight(int height)
Description copied from interface:CellStyle.Builder
Sets the font height- Specified by:
fontHeight
in interfaceCellStyle.Builder
- Parameters:
height
- font height
-
fontHeightInPoint
public CellStyle.Builder fontHeightInPoint(int point)
Description copied from interface:CellStyle.Builder
Sets the font height in point- Specified by:
fontHeightInPoint
in interfaceCellStyle.Builder
- Parameters:
point
- font height in point
-
backColor
public CellStyle.Builder backColor(Color color)
Description copied from interface:CellStyle.Builder
Sets background color of a fill.- Specified by:
backColor
in interfaceCellStyle.Builder
- Parameters:
color
- background color
-
fillColor
public CellStyle.Builder fillColor(Color color)
Description copied from interface:CellStyle.Builder
Sets foreground color of a fill.- Specified by:
fillColor
in interfaceCellStyle.Builder
- Parameters:
color
- fill color
-
fillPattern
public CellStyle.Builder fillPattern(CellStyle.FillPattern pattern)
Description copied from interface:CellStyle.Builder
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.- Specified by:
fillPattern
in interfaceCellStyle.Builder
- Parameters:
pattern
- fill pattern
-
alignment
public CellStyle.Builder alignment(CellStyle.Alignment alignment)
Description copied from interface:CellStyle.Builder
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.- Specified by:
alignment
in interfaceCellStyle.Builder
- Parameters:
alignment
- cell horizontal alignment
-
verticalAlignment
public CellStyle.Builder verticalAlignment(CellStyle.VerticalAlignment alignment)
Description copied from interface:CellStyle.Builder
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
),- Specified by:
verticalAlignment
in interfaceCellStyle.Builder
- Parameters:
alignment
- cell vertical alignment
-
wrapText
public CellStyle.Builder wrapText(boolean wrapText)
Description copied from interface:CellStyle.Builder
Sets wrap text.- Specified by:
wrapText
in interfaceCellStyle.Builder
- Parameters:
wrapText
- wrap text
-
borderLeft
public CellStyle.Builder borderLeft(CellStyle.BorderType borderType)
Description copied from interface:CellStyle.Builder
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.- Specified by:
borderLeft
in interfaceCellStyle.Builder
- Parameters:
borderType
- left border type
-
borderTop
public CellStyle.Builder borderTop(CellStyle.BorderType borderType)
Description copied from interface:CellStyle.Builder
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.- Specified by:
borderTop
in interfaceCellStyle.Builder
- Parameters:
borderType
- top border type
-
borderRight
public CellStyle.Builder borderRight(CellStyle.BorderType borderType)
Description copied from interface:CellStyle.Builder
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.- Specified by:
borderRight
in interfaceCellStyle.Builder
- Parameters:
borderType
- right border type
-
borderBottom
public CellStyle.Builder borderBottom(CellStyle.BorderType borderType)
Description copied from interface:CellStyle.Builder
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.- Specified by:
borderBottom
in interfaceCellStyle.Builder
- Parameters:
borderType
- bottom border type
-
borderTopColor
public CellStyle.Builder borderTopColor(Color color)
Description copied from interface:CellStyle.Builder
Sets top border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)
to create aColor
- Specified by:
borderTopColor
in interfaceCellStyle.Builder
- Parameters:
color
- top border color
-
borderLeftColor
public CellStyle.Builder borderLeftColor(Color color)
Description copied from interface:CellStyle.Builder
Sets left border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)
to create aColor
- Specified by:
borderLeftColor
in interfaceCellStyle.Builder
- Parameters:
color
- left border color
-
borderBottomColor
public CellStyle.Builder borderBottomColor(Color color)
Description copied from interface:CellStyle.Builder
Sets bottom border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)
to create aColor
- Specified by:
borderBottomColor
in interfaceCellStyle.Builder
- Parameters:
color
- bottom border color
-
borderRightColor
public CellStyle.Builder borderRightColor(Color color)
Description copied from interface:CellStyle.Builder
Sets right border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)
to create aColor
- Specified by:
borderRightColor
in interfaceCellStyle.Builder
- Parameters:
color
- right border color
-
dataFormat
public CellStyle.Builder dataFormat(String format)
Description copied from interface:CellStyle.Builder
Sets the data format- Specified by:
dataFormat
in interfaceCellStyle.Builder
- Parameters:
format
- data format
-
locked
public CellStyle.Builder locked(boolean locked)
Description copied from interface:CellStyle.Builder
Sets if the cell should be locked.- Specified by:
locked
in interfaceCellStyle.Builder
- Parameters:
locked
- cell locked
-
hidden
public CellStyle.Builder hidden(boolean hidden)
Description copied from interface:CellStyle.Builder
Sets if the cell formula should be hidden.- Specified by:
hidden
in interfaceCellStyle.Builder
- Parameters:
hidden
- cell formula hidden
-
build
public CellStyle build()
Description copied from interface:CellStyle.Builder
Returns an immutable cell style object.- Specified by:
build
in interfaceCellStyle.Builder
-
-