限定符和类型 | 字段和说明 |
---|---|
static Style |
BORDER_STYLE
Border Style
|
static int |
DEFAULT_PADDING |
static Style |
DEFAULT_STYLE
Default Style
|
static int |
HORIZONTALTEXT |
static int |
LEFT_TO_RIGHT |
static int |
LINE_SLIM_ALPHA
细线透明度值
|
static Style |
NULL_STYLE |
static int |
PADDING_ARG |
static int |
RIGHT_TO_LEFT |
static int |
TEXTSTYLE_MULTILINEADJUSTFONT |
static int |
TEXTSTYLE_SINGLELINE |
static int |
TEXTSTYLE_SINGLELINEADJUSTFONT |
static int |
TEXTSTYLE_WRAPTEXT |
static int |
VERTICALTEXT |
限定符 | 构造器和说明 |
---|---|
protected |
Style()
Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
JSONObject |
border2JSONObject() |
java.lang.Object |
clone()
Clone.
|
protected java.lang.String |
contentStyle2class(java.util.Map contentCssMap,
java.lang.Object value) |
Style |
deriveBackground(Background background)
设置背景
|
Style |
deriveBorder(int border_top,
java.awt.Color border_top_color,
int border_bottom,
java.awt.Color border_bottom_color,
int border_left,
java.awt.Color border_left_color,
int border_right,
java.awt.Color border_right_color)
设置边框
|
Style |
deriveBorderBackgroundNone()
去掉边框和单元格背景
|
Style |
deriveBorderBottom(int border_bottom,
java.awt.Color border_bottom_color)
设置下边框
|
Style |
deriveBorderLeft(int border_left,
java.awt.Color border_left_color)
设置左边框
|
Style |
deriveBorderRight(int border_right,
java.awt.Color border_right_color)
设置右边框
|
Style |
deriveBorderTop(int border_top,
java.awt.Color border_top_color)
设置上边框
|
Style |
deriveFormat(java.text.Format format)
设置样式
|
Style |
deriveFRFont(FRFont frFont)
设置字体
|
Style |
deriveHorizontalAlignment(int horizontal_alignment)
设置水平方向
|
Style |
deriveImageLayout(int imageLayout)
设置图片布局
|
Style |
deriveLineSpacing(int lineSpacing)
设置行间距
|
Style |
derivePadding(int paddingLeft,
int paddingRight)
设置缩进
|
Style |
derivePaddingLeft(int paddingLeft)
设置左缩进
|
Style |
derivePaddingRight(int paddingRight)
设置右缩进
|
Style |
deriveRotation(int rotation)
设置旋转方向
|
Style |
deriveSpacingAfter(int spacingAfter)
设置段后间距
|
Style |
deriveSpacingBefore(int spacingBefore)
设置段前间距
|
Style |
deriveTextDirection(int textDirection)
设置单元格方向
|
Style |
deriveTextStyle(int textStyle)
设置单元格展示样式(自动换行, 单行显示, 多行显示等)
|
Style |
deriveVerticalAlignment(int vertical_alignment)
设置垂直方向
|
Style |
deriveVerticalText(int verticalText)
设置单元格垂直方向
|
boolean |
equals(java.lang.Object object)
Equals.
|
Background |
getBackground()
Gets background.
|
int |
getBorderBottom()
Gets the type of border to use for the bottom border of the cell.
|
java.awt.Color |
getBorderBottomColor()
Gets the color of border to use for the bottom border of the cell.
|
int |
getBorderBottomWidth() |
java.lang.String |
getBorderClsCss()
getBorderClsCss
|
int |
getBorderLeft()
Gets the type of border to use for the left border of the cell.
|
java.awt.Color |
getBorderLeftColor()
Gets the color of border to use for the left border of the cell.
|
int |
getBorderLeftWidth() |
int |
getBorderRight()
Gets the type of border to use for the right border of the cell.
|
java.awt.Color |
getBorderRightColor()
Gets the color of border to use for the right border of the cell.
|
int |
getBorderRightWidth() |
java.util.Map |
getBorderStyleCssMap()
getBorderStyleCssMap
|
int |
getBorderTop()
Gets the type of border to use for the top border of the cell.
|
java.awt.Color |
getBorderTopColor()
Gets the color of border to use for the top border of the cell.
|
int |
getBorderTopWidth()
获取上边框线的宽度
|
java.lang.String |
getContentClsCss()
如果单元格内容不为数字或者字符串的时候使用静态数据
|
java.lang.String |
getContentClsCss(java.lang.Object value)
若value为数字或字符串需要判断一下是否可以转换为数字显示
|
java.util.Map |
getContentStyleCssMap()
getContentStyleCssMap
|
java.text.Format |
getFormat()
Gets cell format.
|
FRFont |
getFRFont()
获取字体
|
int |
getHorizontalAlignment()
已过时。
suggest not directly use;
|
int |
getImageLayout()
Gets the image layout
|
static Style |
getInstance()
getInstance
|
static Style |
getInstance(Background background)
getInstance
|
static Style |
getInstance(java.text.Format format)
获取实例
|
static Style |
getInstance(FRFont frFont)
getInstance
|
byte |
getLineSpacing() |
int |
getPaddingLeft()
get indentation value
|
int |
getPaddingRight()
get indentation value
|
int |
getRotation()
Gets the degree of rotation for the text in the cell
(between -90 and 90 degrees).
|
byte |
getSpacingAfter() |
byte |
getSpacingBefore() |
int |
getTextDirection()
Gets the value of textDirection
|
int |
getTextStyle()
Gets the text style.
|
int |
getVerticalAlignment()
Gets the type of vertical alignment for the cell
|
int |
getVerticalText()
Gets the value of verticalText
|
int |
hashCode()
哈希码
|
static Style |
modCellStyleString(int width,
int height,
java.lang.String text,
Style style,
int resolution)
修改格子样式
|
static void |
paintBackground(java.awt.Graphics2D g2d,
Style style,
double width,
double height)
画背景
通过width, height方式画
|
static void |
paintBackground(java.awt.Graphics2D g2d,
Style style,
java.awt.Rectangle paintRectangle,
java.awt.Rectangle clipRectangle)
画单元格的背景
通过PaintRectangle + ClipRectangle画
|
static void |
paintBorder(java.awt.Graphics2D g2d,
Style style,
double width,
double height)
画边框
通过width, height方式画
|
static void |
paintBorder(java.awt.Graphics2D g2d,
Style style,
java.awt.Rectangle paintRectangle,
java.awt.Rectangle clipRectangle)
画单元格的边框
通过PaintRectangle + ClipRectangle画边框
|
static void |
paintCellStyleString(java.awt.Graphics2D g2d,
int width,
int height,
java.lang.String text,
Style style,
int resolution)
Paint string according to Style.
|
static void |
paintContent(java.awt.Graphics2D g2d,
java.lang.Object value,
int resolution,
Style style,
java.awt.Rectangle paintRectangle,
java.awt.Rectangle clipRectangle)
画单元格的Value
通过PaintRectangle + ClipRectangle画
|
static void |
paintContent(java.awt.Graphics2D g2d,
java.lang.Object value,
Style style,
int width,
int height,
int resolution)
画单元格的Value
通过width, height方式画
|
static void |
paintImageContent(java.awt.Graphics2D g2d,
java.awt.Image value,
Style style,
int width,
int height,
int resolution) |
protected java.lang.Object |
readResolve() |
JSONObject |
toJSONObject(Repository repo,
java.awt.Dimension size)
对象转为json格式
|
protected static java.lang.String |
valueInNumberFormat(java.text.Format format,
java.lang.Object valueToPaint) |
static java.lang.String |
valueToText(java.lang.Object value,
java.text.Format format)
转化成文本
|
public static final int TEXTSTYLE_WRAPTEXT
public static final int TEXTSTYLE_SINGLELINE
public static final int TEXTSTYLE_SINGLELINEADJUSTFONT
public static final int TEXTSTYLE_MULTILINEADJUSTFONT
public static final int VERTICALTEXT
public static final int HORIZONTALTEXT
public static final int LEFT_TO_RIGHT
public static final int RIGHT_TO_LEFT
public static final int PADDING_ARG
public static final int DEFAULT_PADDING
public static final int LINE_SLIM_ALPHA
public static final Style NULL_STYLE
public static Style DEFAULT_STYLE
public static Style BORDER_STYLE
public Style deriveFormat(java.text.Format format)
format
- 格式gpublic static Style getInstance(java.text.Format format)
public static Style getInstance()
public Style deriveBackground(Background background)
background
- 背景 bpublic static Style getInstance(Background background)
public Style deriveBorderBackgroundNone()
public Style deriveBorder(int border_top, java.awt.Color border_top_color, int border_bottom, java.awt.Color border_bottom_color, int border_left, java.awt.Color border_left_color, int border_right, java.awt.Color border_right_color)
border_top
- 上边框像素border_top_color
- 上边框颜色sborder_bottom
- 下 xborder_bottom_color
- 下 xborder_left
- 左 zborder_left_color
- 左zborder_right
- 右yborder_right_color
- 右ypublic Style deriveBorderTop(int border_top, java.awt.Color border_top_color)
border_top
- 上边框尺寸sborder_top_color
- 上边框颜色 spublic Style deriveBorderBottom(int border_bottom, java.awt.Color border_bottom_color)
border_bottom
- 下边框尺寸 xborder_bottom_color
- 下颜色xpublic Style deriveBorderLeft(int border_left, java.awt.Color border_left_color)
border_left
- 尺寸 zborder_left_color
- 颜色ypublic Style deriveBorderRight(int border_right, java.awt.Color border_right_color)
border_right
- 尺寸 cborder_right_color
- 颜色 ypublic Style deriveHorizontalAlignment(int horizontal_alignment)
horizontal_alignment
- 水平方向spublic Style deriveVerticalAlignment(int vertical_alignment)
vertical_alignment
- 垂直方向cConstants.TOP
,
Constants.CENTER
,
Constants.BOTTOM
public Style deriveTextStyle(int textStyle)
textStyle
- 文字样式TEXTSTYLE_WRAPTEXT
,
TEXTSTYLE_SINGLELINE
,
TEXTSTYLE_SINGLELINEADJUSTFONT
,
TEXTSTYLE_MULTILINEADJUSTFONT
public Style deriveTextDirection(int textDirection)
textDirection
- 文本方向wpublic Style deriveVerticalText(int verticalText)
verticalText
- 垂直方向cpublic Style deriveRotation(int rotation)
rotation
- 旋转方向 the new rotation of cell (between -90 and 90 degrees).public Style deriveImageLayout(int imageLayout)
imageLayout
- the new image layout 图片布局tConstants.IMAGE_TILED
,
Constants.IMAGE_CENTER
,
Constants.IMAGE_EXTEND
public Style derivePadding(int paddingLeft, int paddingRight)
paddingLeft
- 左缩进paddingRight
- 右缩进public Style derivePaddingLeft(int paddingLeft)
paddingLeft
- 左缩进public Style derivePaddingRight(int paddingRight)
paddingRight
- 右缩进public Style deriveSpacingBefore(int spacingBefore)
spacingBefore
- 段前间距dpublic Style deriveSpacingAfter(int spacingAfter)
spacingAfter
- 段后间距dpublic Style deriveLineSpacing(int lineSpacing)
lineSpacing
- 行间距hpublic JSONObject toJSONObject(Repository repo, java.awt.Dimension size) throws JSONException
repo
- 浏览器上下文size
- 单元格大小JSONException
public FRFont getFRFont()
public java.text.Format getFormat()
public Background getBackground()
public int getBorderTop()
Constants.LINE_NONE
,
Constants.LINE_THIN
,
Constants.LINE_MEDIUM
,
Constants.LINE_DASH
,
Constants.LINE_HAIR
,
Constants.LINE_HAIR2
,
Constants.LINE_THICK
,
Constants.LINE_DOUBLE
,
Constants.LINE_DOT
,
Constants.LINE_MEDIUM_DASH
,
Constants.LINE_DASH_DOT
,
Constants.LINE_MEDIUM_DASH_DOT
,
Constants.LINE_DASH_DOT_DOT
,
Constants.LINE_MEDIUM_DASH_DOT_DOT
,
Constants.LINE_SLANTED_DASH_DOT
public int getBorderTopWidth()
public int getBorderLeft()
Constants.LINE_NONE
,
Constants.LINE_THIN
,
Constants.LINE_MEDIUM
,
Constants.LINE_DASH
,
Constants.LINE_HAIR
,
Constants.LINE_HAIR2
,
Constants.LINE_THICK
,
Constants.LINE_DOUBLE
,
Constants.LINE_DOT
,
Constants.LINE_MEDIUM_DASH
,
Constants.LINE_DASH_DOT
,
Constants.LINE_MEDIUM_DASH_DOT
,
Constants.LINE_DASH_DOT_DOT
,
Constants.LINE_MEDIUM_DASH_DOT_DOT
,
Constants.LINE_SLANTED_DASH_DOT
public int getBorderLeftWidth()
public int getBorderRightWidth()
public int getBorderBottomWidth()
public int getBorderBottom()
Constants.LINE_NONE
,
Constants.LINE_THIN
,
Constants.LINE_MEDIUM
,
Constants.LINE_DASH
,
Constants.LINE_HAIR
,
Constants.LINE_HAIR2
,
Constants.LINE_THICK
,
Constants.LINE_DOUBLE
,
Constants.LINE_DOT
,
Constants.LINE_MEDIUM_DASH
,
Constants.LINE_DASH_DOT
,
Constants.LINE_MEDIUM_DASH_DOT
,
Constants.LINE_DASH_DOT_DOT
,
Constants.LINE_MEDIUM_DASH_DOT_DOT
,
Constants.LINE_SLANTED_DASH_DOT
public int getBorderRight()
Constants.LINE_NONE
,
Constants.LINE_THIN
,
Constants.LINE_MEDIUM
,
Constants.LINE_DASH
,
Constants.LINE_HAIR
,
Constants.LINE_HAIR2
,
Constants.LINE_THICK
,
Constants.LINE_DOUBLE
,
Constants.LINE_DOT
,
Constants.LINE_MEDIUM_DASH
,
Constants.LINE_DASH_DOT
,
Constants.LINE_MEDIUM_DASH_DOT
,
Constants.LINE_DASH_DOT_DOT
,
Constants.LINE_MEDIUM_DASH_DOT_DOT
,
Constants.LINE_SLANTED_DASH_DOT
public java.awt.Color getBorderTopColor()
public java.awt.Color getBorderLeftColor()
public java.awt.Color getBorderBottomColor()
public java.awt.Color getBorderRightColor()
public int getHorizontalAlignment()
public int getVerticalAlignment()
public int getTextStyle()
public int getVerticalText()
public int getTextDirection()
public int getRotation()
public int getImageLayout()
Constants.IMAGE_TILED
,
Constants.IMAGE_CENTER
,
Constants.IMAGE_EXTEND
public int getPaddingLeft()
public int getPaddingRight()
public byte getSpacingBefore()
public byte getSpacingAfter()
public byte getLineSpacing()
public java.lang.String getContentClsCss()
public java.lang.String getContentClsCss(java.lang.Object value)
value
- public java.util.Map getContentStyleCssMap()
public java.lang.String getBorderClsCss()
public java.util.Map getBorderStyleCssMap()
protected java.lang.String contentStyle2class(java.util.Map contentCssMap, java.lang.Object value)
public JSONObject border2JSONObject() throws JSONException
JSONException
public int hashCode()
hashCode
在类中 java.lang.Object
public boolean equals(java.lang.Object object)
equals
在类中 java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
在类中 java.lang.Object
java.lang.CloneNotSupportedException
protected java.lang.Object readResolve() throws java.io.InvalidObjectException
java.io.InvalidObjectException
public static void paintContent(java.awt.Graphics2D g2d, java.lang.Object value, Style style, int width, int height, int resolution)
public static void paintImageContent(java.awt.Graphics2D g2d, java.awt.Image value, Style style, int width, int height, int resolution)
public static void paintContent(java.awt.Graphics2D g2d, java.lang.Object value, int resolution, Style style, java.awt.Rectangle paintRectangle, java.awt.Rectangle clipRectangle)
public static void paintBackground(java.awt.Graphics2D g2d, Style style, double width, double height)
public static void paintBackground(java.awt.Graphics2D g2d, Style style, java.awt.Rectangle paintRectangle, java.awt.Rectangle clipRectangle)
public static void paintBorder(java.awt.Graphics2D g2d, Style style, double width, double height)
public static void paintBorder(java.awt.Graphics2D g2d, Style style, java.awt.Rectangle paintRectangle, java.awt.Rectangle clipRectangle)
public static java.lang.String valueToText(java.lang.Object value, java.text.Format format)
value
- 带转化的对象format
- 格式gprotected static java.lang.String valueInNumberFormat(java.text.Format format, java.lang.Object valueToPaint)
public static void paintCellStyleString(java.awt.Graphics2D g2d, int width, int height, java.lang.String text, Style style, int resolution)