Package io.keikai.range.impl
Class StyleUtil
- java.lang.Object
-
- io.keikai.range.impl.StyleUtil
-
public class StyleUtil extends java.lang.ObjectA utility class to help spreadsheet set style of a cell- Since:
- 3.5.0
- Author:
- Dennis.Chen
-
-
Field Summary
Fields Modifier and Type Field Description static shortBORDER_EDGE_ALLstatic shortBORDER_EDGE_BOTTOMstatic shortBORDER_EDGE_LEFTstatic shortBORDER_EDGE_RIGHTstatic shortBORDER_EDGE_TOP
-
Constructor Summary
Constructors Constructor Description StyleUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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, java.lang.String htmlColor)static voidsetBorder(SBook book, CellStyleHolder holder, java.lang.String color, SBorder.BorderType linestyle)static voidsetBorder(SBook book, CellStyleHolder holder, java.lang.String htmlColor, SBorder.BorderType lineStyle, short at)static voidsetBorderBottom(SBook book, CellStyleHolder holder, java.lang.String color, SBorder.BorderType linestyle)static voidsetBorderLeft(SBook book, CellStyleHolder holder, java.lang.String color, SBorder.BorderType linestyle)static voidsetBorderRight(SBook book, CellStyleHolder holder, java.lang.String color, SBorder.BorderType linestyle)static voidsetBorderTop(SBook book, CellStyleHolder holder, java.lang.String color, SBorder.BorderType linestyle)static voidsetDataFormat(SBook book, CellStyleHolder holder, java.lang.String format)static voidsetFillColor(SBook book, CellStyleHolder holder, java.lang.String htmlColor)static voidsetFillOptions(SBook book, CellStyleHolder holder, java.lang.String bgColor, java.lang.String fillColor, SFill.FillPattern pattern)static voidsetFontBoldWeight(SBook book, CellStyleHolder holder, SFont.Boldweight boldWeight)static voidsetFontColor(SBook book, CellStyleHolder holder, java.lang.String color)static voidsetFontHeightPoints(SBook book, CellStyleHolder holder, int fontHeightPoints)static voidsetFontItalic(SBook book, CellStyleHolder holder, boolean italic)static voidsetFontName(SBook book, CellStyleHolder holder, java.lang.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, java.lang.String htmlColor)static booleansetRichTextFontHeightPoints(SBook book, SCell cell, int heightPoints)static booleansetRichTextFontItalic(SBook book, SCell cell, boolean italic)static booleansetRichTextFontName(SBook book, SCell cell, java.lang.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 Detail
-
BORDER_EDGE_BOTTOM
public static final short BORDER_EDGE_BOTTOM
- See Also:
- Constant Field Values
-
BORDER_EDGE_RIGHT
public static final short BORDER_EDGE_RIGHT
- See Also:
- Constant Field Values
-
BORDER_EDGE_TOP
public static final short BORDER_EDGE_TOP
- See Also:
- Constant Field Values
-
BORDER_EDGE_LEFT
public static final short BORDER_EDGE_LEFT
- See Also:
- Constant Field Values
-
BORDER_EDGE_ALL
public static final short BORDER_EDGE_ALL
- See Also:
- Constant Field Values
-
-
Method Detail
-
setFontColor
public static void setFontColor(SBook book, CellStyleHolder holder, java.lang.String color)
-
setFillColor
public static void setFillColor(SBook book, CellStyleHolder holder, java.lang.String htmlColor)
-
setBackColor
public static void setBackColor(SBook book, CellStyleHolder holder, java.lang.String htmlColor)
-
setFillOptions
public static void setFillOptions(SBook book, CellStyleHolder holder, java.lang.String bgColor, java.lang.String fillColor, SFill.FillPattern pattern)
-
setTextWrap
public static void setTextWrap(SBook book, CellStyleHolder holder, boolean wrap)
-
setFontHeightPoints
public static void setFontHeightPoints(SBook book, CellStyleHolder holder, int fontHeightPoints)
-
setFontStrikethrough
public static void setFontStrikethrough(SBook book, CellStyleHolder holder, boolean strikeout)
-
setFontName
public static void setFontName(SBook book, CellStyleHolder holder, java.lang.String name)
-
setBorder
public static void setBorder(SBook book, CellStyleHolder holder, java.lang.String color, SBorder.BorderType linestyle)
-
setBorderTop
public static void setBorderTop(SBook book, CellStyleHolder holder, java.lang.String color, SBorder.BorderType linestyle)
-
setBorderLeft
public static void setBorderLeft(SBook book, CellStyleHolder holder, java.lang.String color, SBorder.BorderType linestyle)
-
setBorderBottom
public static void setBorderBottom(SBook book, CellStyleHolder holder, java.lang.String color, SBorder.BorderType linestyle)
-
setBorderRight
public static void setBorderRight(SBook book, CellStyleHolder holder, java.lang.String color, SBorder.BorderType linestyle)
-
setBorder
public static void setBorder(SBook book, CellStyleHolder holder, java.lang.String htmlColor, SBorder.BorderType lineStyle, short at)
-
setFontBoldWeight
public static void setFontBoldWeight(SBook book, CellStyleHolder holder, SFont.Boldweight boldWeight)
-
setFontItalic
public static void setFontItalic(SBook book, CellStyleHolder holder, boolean italic)
-
setFontUnderline
public static void setFontUnderline(SBook book, CellStyleHolder holder, SFont.Underline underline)
-
setTextHAlign
public static void setTextHAlign(SBook book, CellStyleHolder holder, SCellStyle.Alignment align)
-
setTextVAlign
public static void setTextVAlign(SBook book, CellStyleHolder holder, SCellStyle.VerticalAlignment valign)
-
setDataFormat
public static void setDataFormat(SBook book, CellStyleHolder holder, java.lang.String format)
-
setFontTypeOffset
public static void setFontTypeOffset(SBook book, CellStyleHolder holder, SFont.TypeOffset offset)
-
setRichTextFontTypeOffset
public static boolean setRichTextFontTypeOffset(SBook book, SCell cell, SFont.TypeOffset offset)
-
setRichTextFontBoldweight
public static boolean setRichTextFontBoldweight(SBook book, SCell cell, SFont.Boldweight bold)
-
setRichTextFontItalic
public static boolean setRichTextFontItalic(SBook book, SCell cell, boolean italic)
-
setRichTextFontUnderline
public static boolean setRichTextFontUnderline(SBook book, SCell cell, SFont.Underline underline)
-
setRichTextFontName
public static boolean setRichTextFontName(SBook book, SCell cell, java.lang.String name)
-
setRichTextFontHeightPoints
public static boolean setRichTextFontHeightPoints(SBook book, SCell cell, int heightPoints)
-
setRichTextFontStrikeout
public static boolean setRichTextFontStrikeout(SBook book, SCell cell, boolean strike)
-
setRichTextFontColor
public static boolean setRichTextFontColor(SBook book, SCell cell, java.lang.String htmlColor)
-
setTextRotation
public static void setTextRotation(SBook book, CellStyleHolder holder, int rotation)
-
setTextIndentionOffset
public static void setTextIndentionOffset(SBook book, CellStyleHolder holder, int offset)
-
setTextIndention
public static void setTextIndention(SBook book, CellStyleHolder holder, int indent)
-
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
public static SCellStyle prepareStyle(SCell srcCell)
-
setNewCellStyle
public static void setNewCellStyle(CellStyleHolder holder, SCellStyle cellStyle)
-
setLocked
public static void setLocked(SBook book, CellStyleHolder holder, boolean locked)
Apply the locked to a range- Parameters:
book-holder-locked-- Since:
- 6.0.0
-
-