public class TextElement extends AbstractElement<TextElement>
| Constructor and Description |
|---|
TextElement(String text,
Font font,
int x,
int y) |
TextElement(String text,
int fontSize,
int x,
int y) |
TextElement(String text,
String fontName,
int fontSize,
int x,
int y) |
| Modifier and Type | Method and Description |
|---|---|
Color |
getColor() |
Font |
getFont() |
int |
getLineHeight() |
int |
getMaxLineCount() |
int |
getMaxLineWidth() |
Integer |
getRotate() |
String |
getText() |
boolean |
isAutoBreakLine() |
boolean |
isStrikeThrough() |
TextElement |
setAutoBreakLine(boolean autoBreakLine) |
TextElement |
setAutoBreakLine(int maxLineWidth,
int maxLineCount,
int lineHeight)
设置自动换行
|
TextElement |
setColor(Color color) |
TextElement |
setFont(Font font) |
TextElement |
setLineHeight(int lineHeight) |
TextElement |
setMaxLineCount(int maxLineCount) |
TextElement |
setMaxLineWidth(int maxLineWidth) |
TextElement |
setRotate(Integer rotate) |
TextElement |
setStrikeThrough(boolean strikeThrough) |
TextElement |
setText(String text) |
public TextElement(String text, Font font, int x, int y)
text - 文本内容font - Font对象x - x坐标y - y坐标public TextElement(String text, int fontSize, int x, int y)
text - 文本内容fontSize - 字号x - x坐标y - y坐标public TextElement setAutoBreakLine(int maxLineWidth, int maxLineCount, int lineHeight)
maxLineWidth - 最大行宽maxLineCount - 最大行数lineHeight - 行高public String getText()
public TextElement setText(String text)
public Font getFont()
public TextElement setFont(Font font)
public Color getColor()
public TextElement setColor(Color color)
public boolean isStrikeThrough()
public TextElement setStrikeThrough(boolean strikeThrough)
public boolean isAutoBreakLine()
public TextElement setAutoBreakLine(boolean autoBreakLine)
public int getMaxLineWidth()
public TextElement setMaxLineWidth(int maxLineWidth)
public int getMaxLineCount()
public TextElement setMaxLineCount(int maxLineCount)
public int getLineHeight()
public TextElement setLineHeight(int lineHeight)
public Integer getRotate()
public TextElement setRotate(Integer rotate)
Copyright © 2021. All rights reserved.