FormattedText

遗产: java.lang.Object

public final class FormattedText

表示格式化文本的类。包含有关文本及其颜色、大小、样式的信息。

构造函数

构造函数描述
FormattedText()初始化格式化文本。
FormattedText(String text)初始化格式化文本。
FormattedText(String text, FontColor fontColor, int fontStyle, int encodingType, boolean embedded, float textSize)初始化格式化文本。
FormattedText(String text, FontColor fontColor, int textFont, int textEncoding, boolean embedded, float textSize, float lineSpacing)初始化格式化文本。
FormattedText(String text, Color color, int textFont, int textEncoding, boolean embedded, float textSize)初始化格式化文本。
FormattedText(String text, Color textColor, int textFont, int textEncoding, boolean embedded, float textSize, float lineSpacing)初始化格式化文本。
FormattedText(String text, FontColor textColor, FontColor backColor, int textFont, int textEncoding, boolean embedded, float textSize)初始化格式化文本。
FormattedText(String text, FontColor textColor, FontColor backColor, int textFont, int textEncoding, boolean embedded, float textSize, float lineSpacing)初始化格式化文本。
FormattedText(String text, Color textColor, Color backColor, int textFont, int encoding, boolean embedded, float textSize)初始化格式化文本。
FormattedText(String text, Color textColor, Color backColor, int textFont, int textEncoding, boolean embedded, float textSize, float lineSpacing)初始化格式化文本。
FormattedText(String text, Color textColor, Color backColor, String fontName, int textEncoding, boolean embedded, float fontSize)初始化格式化文本。
FormattedText(String text, Color textColor, Color backColor)初始化格式化文本。
FormattedText(String text, Color textColor, String fontName, int textEncoding, boolean embedded, float fontSize)初始化格式化文本。

方法

方法描述
addNewLineText(String newLineText)向 FormattedText 对象添加新行并将 newLineText 设置为下一行的文本。
addNewLineText(String newLineText, float lineSpacing)向 FormattedText 对象添加新行并将 newLineText 设置为下一行的文本。
equals(Object arg0)
getBackColor()Internal 获取返回颜色
getClass()
getFirstLine()获取第一行
getFont()获取字体
getFontSize()获取字体大小
getText()仅供内部使用
getTextColor()Internal 获取文字颜色
getTextHeight()获取文本的高度。
getTextWidth()获取文本的宽度。
hashCode()
notify()
notifyAll()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

FormattedText()

public FormattedText()

初始化格式化文本。

FormattedText(String text)

public FormattedText(String text)

初始化格式化文本。

参数:

范围类型描述
textjava.lang.String包含在 FormattedText 中的文本。

FormattedText(String text, FontColor fontColor, int fontStyle, int encodingType, boolean embedded, float textSize)

public FormattedText(String text, FontColor fontColor, int fontStyle, int encodingType, boolean embedded, float textSize)

初始化格式化文本。

参数:

范围类型描述
textjava.lang.String字符串的文本内容。
fontColorFontColor文本的颜色。
fontStyleint文本的样式。
encodingTypeint编码类型(EncodingType 枚举的值)。
embeddedboolean如果将嵌入字体,则为真。
textSizefloat文本的大小。

FormattedText(String text, FontColor fontColor, int textFont, int textEncoding, boolean embedded, float textSize, float lineSpacing)

public FormattedText(String text, FontColor fontColor, int textFont, int textEncoding, boolean embedded, float textSize, float lineSpacing)

初始化格式化文本。

参数:

范围类型描述
textjava.lang.String字符串的文本内容。
fontColorFontColor文本的颜色。
textFontint文本的字体。
textEncodingint文本的编码。
embeddedboolean如果将嵌入文本,则为真。
textSizefloat文本的大小。
lineSpacingfloat附加间距。

FormattedText(String text, Color color, int textFont, int textEncoding, boolean embedded, float textSize)

public FormattedText(String text, Color color, int textFont, int textEncoding, boolean embedded, float textSize)

初始化格式化文本。

参数:

范围类型描述
textjava.lang.String字符串的文本内容。
colorjava.awt.Color文本的颜色。
textFontint文本的字体。
textEncodingint文本的编码。
embeddedboolean如果将嵌入文本,则为真。
textSizefloat文本的大小。

FormattedText(String text, Color textColor, int textFont, int textEncoding, boolean embedded, float textSize, float lineSpacing)

public FormattedText(String text, Color textColor, int textFont, int textEncoding, boolean embedded, float textSize, float lineSpacing)

初始化格式化文本。

参数:

范围类型描述
textjava.lang.String字符串的文本内容。
textColorjava.awt.Color文本的颜色。
textFontint文本的字体。
textEncodingint文本的编码。
embeddedboolean如果 true 字体将被嵌入。
textSizefloat文本的大小。
lineSpacingfloat附加间距。

FormattedText(String text, FontColor textColor, FontColor backColor, int textFont, int textEncoding, boolean embedded, float textSize)

public FormattedText(String text, FontColor textColor, FontColor backColor, int textFont, int textEncoding, boolean embedded, float textSize)

初始化格式化文本。

参数:

范围类型描述
textjava.lang.String字符串的文本内容。
textColorFontColor文本的颜色。
backColorFontColor背景颜色。
textFontint文本的字体。
textEncodingint文本的编码。
embeddedboolean如果 true 字体将被嵌入。
textSizefloat文本的大小。

FormattedText(String text, FontColor textColor, FontColor backColor, int textFont, int textEncoding, boolean embedded, float textSize, float lineSpacing)

public FormattedText(String text, FontColor textColor, FontColor backColor, int textFont, int textEncoding, boolean embedded, float textSize, float lineSpacing)

初始化格式化文本。

参数:

范围类型描述
textjava.lang.String文字内容。
textColorFontColor文本的颜色。
backColorFontColor背景颜色。
textFontint文本的字体。
textEncodingint文本的编码。
embeddedboolean如果 true 字体将被嵌入。
textSizefloat文本的大小。
lineSpacingfloat附加间距。

FormattedText(String text, Color textColor, Color backColor, int textFont, int encoding, boolean embedded, float textSize)

public FormattedText(String text, Color textColor, Color backColor, int textFont, int encoding, boolean embedded, float textSize)

初始化格式化文本。

参数:

范围类型描述
textjava.lang.String字符串的文本内容。
textColorjava.awt.Color文本的颜色。
backColorjava.awt.Color背景颜色。
textFontint文本的字体。
encodingint文本的编码。
embeddedboolean如果将嵌入字体,则为真。
textSizefloat文本的大小。

FormattedText(String text, Color textColor, Color backColor, int textFont, int textEncoding, boolean embedded, float textSize, float lineSpacing)

public FormattedText(String text, Color textColor, Color backColor, int textFont, int textEncoding, boolean embedded, float textSize, float lineSpacing)

初始化格式化文本。

参数:

范围类型描述
textjava.lang.String字符串的文本内容。
textColorjava.awt.Color文本的颜色。
backColorjava.awt.Color背景的颜色。
textFontint文本的字体。
textEncodingint文本的编码。
embeddedboolean如果嵌入了真实字体。
textSizefloat文本的大小。
lineSpacingfloat附加间距。

FormattedText(String text, Color textColor, Color backColor, String fontName, int textEncoding, boolean embedded, float fontSize)

public FormattedText(String text, Color textColor, Color backColor, String fontName, int textEncoding, boolean embedded, float fontSize)

初始化格式化文本。

参数:

范围类型描述
textjava.lang.String文字内容。
textColorjava.awt.Color文本的颜色。
backColorjava.awt.Color背景颜色。
fontNamejava.lang.String文本的字体。
textEncodingint文本的编码。
embeddedboolean如果 true 字体将被嵌入。
fontSizefloat文本的大小。

FormattedText(String text, Color textColor, Color backColor)

public FormattedText(String text, Color textColor, Color backColor)

初始化格式化文本。

参数:

范围类型描述
textjava.lang.String文字内容。
textColorjava.awt.Color文本的颜色。
backColorjava.awt.Color背景颜色。

FormattedText(String text, Color textColor, String fontName, int textEncoding, boolean embedded, float fontSize)

public FormattedText(String text, Color textColor, String fontName, int textEncoding, boolean embedded, float fontSize)

初始化格式化文本。

参数:

范围类型描述
textjava.lang.String文字内容。
textColorjava.awt.Color文本的颜色。
fontNamejava.lang.String文本的字体。
textEncodingint文本的编码。
embeddedboolean如果 true 字体将被嵌入。
fontSizefloat文本的大小。

addNewLineText(String newLineText)

public void addNewLineText(String newLineText)

向 FormattedText 对象添加新行并将 newLineText 设置为下一行的文本。

参数:

范围类型描述
newLineTextjava.lang.String新添加行的文本。

addNewLineText(String newLineText, float lineSpacing)

public void addNewLineText(String newLineText, float lineSpacing)

向 FormattedText 对象添加新行并将 newLineText 设置为下一行的文本。

参数:

范围类型描述
newLineTextjava.lang.String新添加行的文本。
lineSpacingfloat行间距。

equals(Object arg0)

public boolean equals(Object arg0)

参数:

范围类型描述
arg0java.lang.Object

退货: 布尔值

getBackColor()

public System.Drawing.Color getBackColor()

Internal 获取返回颜色

退货: Color - 颜色元素

getClass()

public final native Class<?> getClass()

退货: java.lang.Class

getFirstLine()

public String getFirstLine()

获取第一行

退货: java.lang.String - 字符串值

getFont()

public Font getFont()

获取字体

退货: Font - 字体元素

getFontSize()

public float getFontSize()

获取字体大小

退货: float - 浮点值

getText()

public System.Collections.Generic.List<String> getText()

仅供内部使用

退货: com.aspose.ms.System.Collections.Generic.List<java.lang.String> - 内部对象

getTextColor()

public System.Drawing.Color getTextColor()

Internal 获取文字颜色

退货: Color - 颜色元素

getTextHeight()

public float getTextHeight()

获取文本的高度。

退货: float - 浮点值

getTextWidth()

public float getTextWidth()

获取文本的宽度。

退货: float - 浮点值

hashCode()

public native int hashCode()

退货: 整数

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

toString()

public String toString()

退货: java.lang.字符串

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

参数:

范围类型描述
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

参数:

范围类型描述
arg0long
arg1int