Package io.keikai.range.impl
Class StyleUtil
- java.lang.Object
-
- io.keikai.range.impl.StyleUtil
-
public class StyleUtil extends Object
A 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 short
BORDER_EDGE_ALL
static short
BORDER_EDGE_BOTTOM
static short
BORDER_EDGE_LEFT
static short
BORDER_EDGE_RIGHT
static short
BORDER_EDGE_TOP
-
Constructor Summary
Constructors Constructor Description StyleUtil()
-
Method Summary
-
-
-
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, String color)
-
setFillColor
public static void setFillColor(SBook book, CellStyleHolder holder, String htmlColor)
-
setBackColor
public static void setBackColor(SBook book, CellStyleHolder holder, String htmlColor)
-
setFillOptions
public static void setFillOptions(SBook book, CellStyleHolder holder, String bgColor, 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, String name)
-
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
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, 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)
-
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, 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
-
-