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.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.
-
-
-
Constructor Detail
-
CellStyleBuilderImpl
public CellStyleBuilderImpl(SBook book, SCellStyle src)
-
-
Method Detail
-
fontName
public CellStyle.Builder fontName(String name)
Description copied from interface:CellStyle.BuilderSets the font name.- Specified by:
fontNamein interfaceCellStyle.Builder- Parameters:
name- font name, e.g. "Calibri"
-
fontColor
public CellStyle.Builder fontColor(Color color)
Description copied from interface:CellStyle.BuilderSets the font color.- Specified by:
fontColorin interfaceCellStyle.Builder- Parameters:
color- font color
-
fontBoldweight
public CellStyle.Builder fontBoldweight(Font.Boldweight boldweight)
Description copied from interface:CellStyle.BuilderSets the font bold style.- Specified by:
fontBoldweightin interfaceCellStyle.Builder- Parameters:
boldweight- font bold weight
-
fontItalic
public CellStyle.Builder fontItalic(boolean italic)
Description copied from interface:CellStyle.BuilderSets if the font is italic.- Specified by:
fontItalicin interfaceCellStyle.Builder- Parameters:
italic- font italic
-
fontStrikeout
public CellStyle.Builder fontStrikeout(boolean strikeout)
Description copied from interface:CellStyle.BuilderSets if the font is strikeout.- Specified by:
fontStrikeoutin interfaceCellStyle.Builder- Parameters:
strikeout- font strikeout
-
fontUnderline
public CellStyle.Builder fontUnderline(Font.Underline underline)
Description copied from interface:CellStyle.BuilderSets the font underline style.- Specified by:
fontUnderlinein interfaceCellStyle.Builder- Parameters:
underline- font underline
-
fontHeight
public CellStyle.Builder fontHeight(int height)
Description copied from interface:CellStyle.BuilderSets the font height- Specified by:
fontHeightin interfaceCellStyle.Builder- Parameters:
height- font height
-
fontHeightInPoint
public CellStyle.Builder fontHeightInPoint(int point)
Description copied from interface:CellStyle.BuilderSets the font height in point- Specified by:
fontHeightInPointin interfaceCellStyle.Builder- Parameters:
point- font height in point
-
backColor
public CellStyle.Builder backColor(Color color)
Description copied from interface:CellStyle.BuilderSets background color of a fill.- Specified by:
backColorin interfaceCellStyle.Builder- Parameters:
color- background color
-
fillColor
public CellStyle.Builder fillColor(Color color)
Description copied from interface:CellStyle.BuilderSets foreground color of a fill.- Specified by:
fillColorin interfaceCellStyle.Builder- Parameters:
color- fill color
-
fillPattern
public CellStyle.Builder fillPattern(CellStyle.FillPattern pattern)
Description copied from interface:CellStyle.BuilderSets 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.- Specified by:
fillPatternin interfaceCellStyle.Builder- Parameters:
pattern- fill pattern
-
alignment
public CellStyle.Builder alignment(CellStyle.Alignment alignment)
Description copied from interface:CellStyle.BuilderSets 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.- Specified by:
alignmentin interfaceCellStyle.Builder- Parameters:
alignment- cell horizontal alignment
-
verticalAlignment
public CellStyle.Builder verticalAlignment(CellStyle.VerticalAlignment alignment)
Description copied from interface:CellStyle.BuilderSets 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:
verticalAlignmentin interfaceCellStyle.Builder- Parameters:
alignment- cell vertical alignment
-
wrapText
public CellStyle.Builder wrapText(boolean wrapText)
Description copied from interface:CellStyle.BuilderSets wrap text.- Specified by:
wrapTextin interfaceCellStyle.Builder- Parameters:
wrapText- wrap text
-
borderLeft
public CellStyle.Builder borderLeft(CellStyle.BorderType borderType)
Description copied from interface:CellStyle.BuilderSets 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.- Specified by:
borderLeftin interfaceCellStyle.Builder- Parameters:
borderType- left border type
-
borderTop
public CellStyle.Builder borderTop(CellStyle.BorderType borderType)
Description copied from interface:CellStyle.BuilderSets 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.- Specified by:
borderTopin interfaceCellStyle.Builder- Parameters:
borderType- top border type
-
borderRight
public CellStyle.Builder borderRight(CellStyle.BorderType borderType)
Description copied from interface:CellStyle.BuilderSets 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.- Specified by:
borderRightin interfaceCellStyle.Builder- Parameters:
borderType- right border type
-
borderBottom
public CellStyle.Builder borderBottom(CellStyle.BorderType borderType)
Description copied from interface:CellStyle.BuilderSets 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.- Specified by:
borderBottomin interfaceCellStyle.Builder- Parameters:
borderType- bottom border type
-
borderTopColor
public CellStyle.Builder borderTopColor(Color color)
Description copied from interface:CellStyle.BuilderSets top border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)to create aColor- Specified by:
borderTopColorin interfaceCellStyle.Builder- Parameters:
color- top border color
-
borderLeftColor
public CellStyle.Builder borderLeftColor(Color color)
Description copied from interface:CellStyle.BuilderSets left border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)to create aColor- Specified by:
borderLeftColorin interfaceCellStyle.Builder- Parameters:
color- left border color
-
borderBottomColor
public CellStyle.Builder borderBottomColor(Color color)
Description copied from interface:CellStyle.BuilderSets bottom border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)to create aColor- Specified by:
borderBottomColorin interfaceCellStyle.Builder- Parameters:
color- bottom border color
-
borderRightColor
public CellStyle.Builder borderRightColor(Color color)
Description copied from interface:CellStyle.BuilderSets right border color. you could useRange.CellStyleHelper.createColorFromHtmlColor(String)to create aColor- Specified by:
borderRightColorin interfaceCellStyle.Builder- Parameters:
color- right border color
-
dataFormat
public CellStyle.Builder dataFormat(String format)
Description copied from interface:CellStyle.BuilderSets the data format- Specified by:
dataFormatin interfaceCellStyle.Builder- Parameters:
format- data format
-
locked
public CellStyle.Builder locked(boolean locked)
Description copied from interface:CellStyle.BuilderSets if the cell should be locked.- Specified by:
lockedin interfaceCellStyle.Builder- Parameters:
locked- cell locked
-
hidden
public CellStyle.Builder hidden(boolean hidden)
Description copied from interface:CellStyle.BuilderSets if the cell formula should be hidden.- Specified by:
hiddenin interfaceCellStyle.Builder- Parameters:
hidden- cell formula hidden
-
build
public CellStyle build()
Description copied from interface:CellStyle.BuilderReturns an immutable cell style object.- Specified by:
buildin interfaceCellStyle.Builder
-
-