TextRun
コンテンツ
[
隠れる
]Inheritance: java.lang.Object
public class TextRun
関連付けられたスタイルを持つテキストの一部を表すクラスです。
コンストラクタ
| コンストラクタ | 説明 |
|---|---|
| TextRun(String text, TextStyle style) | 新しい TextRun クラスのインスタンスを初期化します。 |
| TextRun(String text) | デフォルトスタイルで新しい TextRun クラスのインスタンスを初期化します。 |
| TextRun(TextStyle style) | 空のテキストで新しい TextRun クラスのインスタンスを初期化します。 |
| TextRun() | 空のテキストとデフォルトスタイルで新しい TextRun クラスのインスタンスを初期化します。 |
メソッド
| メソッド | 説明 |
|---|---|
| getLength() | 関連するテキストの長さを取得します。 |
| getStyle() | スタイルを取得します。 |
| getText() | テキストを取得します。 |
| setStyle(TextStyle value) | スタイルを設定します。 |
| setText(String value) | テキストを設定します。 |
TextRun(String text, TextStyle style)
public TextRun(String text, TextStyle style)
新しい TextRun クラスのインスタンスを初期化します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| テキスト | java.lang.String | 関連するテキストです。 |
| style | TextStyle | スタイル。 |
TextRun(String text)
public TextRun(String text)
デフォルトスタイルで新しい TextRun クラスのインスタンスを初期化します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| テキスト | java.lang.String | 関連するテキストです。 |
TextRun(TextStyle style)
public TextRun(TextStyle style)
空のテキストで新しい TextRun クラスのインスタンスを初期化します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| style | TextStyle | スタイル。 |
TextRun()
public TextRun()
空のテキストとデフォルトスタイルで新しい TextRun クラスのインスタンスを初期化します。
getLength()
public final int getLength()
関連するテキストの長さを取得します。
Returns: int
getStyle()
public final TextStyle getStyle()
スタイルを取得します。
Returns: TextStyle
getText()
public final String getText()
テキストを取得します。
Returns: java.lang.String
setStyle(TextStyle value)
public final void setStyle(TextStyle value)
スタイルを設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| value | TextStyle |
setText(String value)
public final void setText(String value)
テキストを設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | java.lang.String |