Package io.keikai.range.impl
Class StyleUtil
java.lang.Object
io.keikai.range.impl.StyleUtil
A utility class to help spreadsheet set style of a cell
- Since:
- 3.5.0
- Author:
- Dennis.Chen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortstatic final shortstatic final shortstatic final shortstatic final short -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SCellStylegetBottomStyle(SCellStyle cellStyle, SCellStyle tbStyle, SConditionalStyle cdStyle) static SCellStylegetFillStyle(SCellStyle cellStyle, SCellStyle tbStyle, SConditionalStyle cdStyle) static SFontgetFontStyle(SBook book, SCellStyle cellStyle, SCellStyle tbCellStyle, SConditionalStyle cdStyle) static SCellStylegetLeftStyle(SCellStyle cellStyle, SCellStyle tbStyle, SConditionalStyle cdStyle) static SCellStylegetRightStyle(SCellStyle cellStyle, SCellStyle tbStyle, SConditionalStyle cdStyle) static SCellStylegetTopStyle(SCellStyle cellStyle, SCellStyle tbStyle, SConditionalStyle cdStyle) static SCellStyleprepareStyle(SCell srcCell) static voidsetBackColor(SBook book, CellStyleHolder holder, String htmlColor) static voidsetBorder(SBook book, CellStyleHolder holder, String color, SBorder.BorderType linestyle) static voidsetBorder(SBook book, CellStyleHolder holder, String htmlColor, SBorder.BorderType lineStyle, short at) static voidsetBorderBottom(SBook book, CellStyleHolder holder, String color, SBorder.BorderType linestyle) static voidsetBorderLeft(SBook book, CellStyleHolder holder, String color, SBorder.BorderType linestyle) static voidsetBorderRight(SBook book, CellStyleHolder holder, String color, SBorder.BorderType linestyle) static voidsetBorderTop(SBook book, CellStyleHolder holder, String color, SBorder.BorderType linestyle) static voidsetDataFormat(SBook book, CellStyleHolder holder, String format) static voidsetFillColor(SBook book, CellStyleHolder holder, String htmlColor) static voidsetFillOptions(SBook book, CellStyleHolder holder, String bgColor, String fillColor, SFill.FillPattern pattern) static voidsetFontBoldWeight(SBook book, CellStyleHolder holder, SFont.Boldweight boldWeight) static voidsetFontColor(SBook book, CellStyleHolder holder, String color) static voidsetFontHeightPoints(SBook book, CellStyleHolder holder, int fontHeightPoints) static voidsetFontItalic(SBook book, CellStyleHolder holder, boolean italic) static voidsetFontName(SBook book, CellStyleHolder holder, String name) static voidsetFontStrikethrough(SBook book, CellStyleHolder holder, boolean strikeout) static voidsetFontTypeOffset(SBook book, CellStyleHolder holder, SFont.TypeOffset offset) static voidsetFontUnderline(SBook book, CellStyleHolder holder, SFont.Underline underline) static voidsetLocked(SBook book, CellStyleHolder holder, boolean locked) Apply the locked to a rangestatic voidsetNewCellStyle(CellStyleHolder holder, SCellStyle cellStyle) static booleansetRichTextFontBoldweight(SBook book, SCell cell, SFont.Boldweight bold) static booleansetRichTextFontColor(SBook book, SCell cell, String htmlColor) static booleansetRichTextFontHeightPoints(SBook book, SCell cell, int heightPoints) static booleansetRichTextFontItalic(SBook book, SCell cell, boolean italic) static booleansetRichTextFontName(SBook book, SCell cell, String name) static booleansetRichTextFontStrikeout(SBook book, SCell cell, boolean strike) static booleansetRichTextFontTypeOffset(SBook book, SCell cell, SFont.TypeOffset offset) static booleansetRichTextFontUnderline(SBook book, SCell cell, SFont.Underline underline) static voidsetTextHAlign(SBook book, CellStyleHolder holder, SCellStyle.Alignment align) static voidsetTextIndention(SBook book, CellStyleHolder holder, int indent) static voidsetTextIndentionOffset(SBook book, CellStyleHolder holder, int offset) static voidsetTextRotation(SBook book, CellStyleHolder holder, int rotation) static voidsetTextVAlign(SBook book, CellStyleHolder holder, SCellStyle.VerticalAlignment valign) static voidsetTextWrap(SBook book, CellStyleHolder holder, boolean wrap)
-
Field Details
-
BORDER_EDGE_BOTTOM
public static final short BORDER_EDGE_BOTTOM- See Also:
-
BORDER_EDGE_RIGHT
public static final short BORDER_EDGE_RIGHT- See Also:
-
BORDER_EDGE_TOP
public static final short BORDER_EDGE_TOP- See Also:
-
BORDER_EDGE_LEFT
public static final short BORDER_EDGE_LEFT- See Also:
-
BORDER_EDGE_ALL
public static final short BORDER_EDGE_ALL- See Also:
-
-
Constructor Details
-
StyleUtil
public StyleUtil()
-
-
Method Details
-
setFontColor
-
setFillColor
-
setBackColor
-
setFillOptions
public static void setFillOptions(SBook book, CellStyleHolder holder, String bgColor, String fillColor, SFill.FillPattern pattern) -
setTextWrap
-
setFontHeightPoints
-
setFontStrikethrough
-
setFontName
-
setBorder
public static void setBorder(SBook book, CellStyleHolder holder, String color, SBorder.BorderType linestyle) -
setBorderTop
public static void setBorderTop(SBook book, CellStyleHolder holder, String color, SBorder.BorderType linestyle) -
setBorderLeft
public static void setBorderLeft(SBook book, CellStyleHolder holder, String color, SBorder.BorderType linestyle) -
setBorderBottom
public static void setBorderBottom(SBook book, CellStyleHolder holder, String color, SBorder.BorderType linestyle) -
setBorderRight
public static void setBorderRight(SBook book, CellStyleHolder holder, String color, SBorder.BorderType linestyle) -
setBorder
public static void setBorder(SBook book, CellStyleHolder holder, String htmlColor, SBorder.BorderType lineStyle, short at) -
setFontBoldWeight
public static void setFontBoldWeight(SBook book, CellStyleHolder holder, SFont.Boldweight boldWeight) -
setFontItalic
-
setFontUnderline
-
setTextHAlign
-
setTextVAlign
public static void setTextVAlign(SBook book, CellStyleHolder holder, SCellStyle.VerticalAlignment valign) -
setDataFormat
-
setFontTypeOffset
-
setRichTextFontTypeOffset
-
setRichTextFontBoldweight
-
setRichTextFontItalic
-
setRichTextFontUnderline
-
setRichTextFontName
-
setRichTextFontHeightPoints
-
setRichTextFontStrikeout
-
setRichTextFontColor
-
setTextRotation
-
setTextIndentionOffset
-
setTextIndention
-
getFontStyle
public static SFont getFontStyle(SBook book, SCellStyle cellStyle, SCellStyle tbCellStyle, SConditionalStyle cdStyle) -
getFillStyle
public static SCellStyle getFillStyle(SCellStyle cellStyle, SCellStyle tbStyle, SConditionalStyle cdStyle) -
getLeftStyle
public static SCellStyle getLeftStyle(SCellStyle cellStyle, SCellStyle tbStyle, SConditionalStyle cdStyle) -
getTopStyle
public static SCellStyle getTopStyle(SCellStyle cellStyle, SCellStyle tbStyle, SConditionalStyle cdStyle) -
getRightStyle
public static SCellStyle getRightStyle(SCellStyle cellStyle, SCellStyle tbStyle, SConditionalStyle cdStyle) -
getBottomStyle
public static SCellStyle getBottomStyle(SCellStyle cellStyle, SCellStyle tbStyle, SConditionalStyle cdStyle) -
prepareStyle
-
setNewCellStyle
-
setLocked
Apply the locked to a range- Parameters:
book-holder-locked-- Since:
- 6.0.0
-