|
Java プラットフォーム 1.2 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--java.text.AttributedString
テキストとそのテキストに関連する属性情報を保持します。テキストを読んだユーザが AttributedCharacterIterator インタフェースを使って属性付きテキストにアクセスすることが必要な場合に、これを実際のデータストレージとして使用できます。
AttributedCharacterIterator
,
Annotation
コンストラクタの概要 | |
AttributedString(AttributedCharacterIterator text)
AttributedCharacterIterator によって表現される、指定された属性付きテキストを持つ AttributedString のインスタンスを生成します。 |
|
AttributedString(AttributedCharacterIterator text,
int beginIndex,
int endIndex)
AttributedCharacterIterator によって表現される、指定された属性付きテキストの部分範囲を持つ AttributedString のインスタンスを生成します。 |
|
AttributedString(AttributedCharacterIterator text,
int beginIndex,
int endIndex,
AttributedCharacterIterator.Attribute[] attributes)
AttributedCharacterIterator によって表現される、指定された属性付きテキストの部分範囲を持つ AttributedString のインスタンスを生成します。 |
|
AttributedString(String text)
指定されたテキストを持つ AttributedString のインスタンスを生成します。 |
|
AttributedString(String text,
Map attributes)
指定されたテキストと属性を持つ AttributedString のインスタンスを生成します。 |
メソッドの概要 | |
void |
addAttribute(AttributedCharacterIterator.Attribute attribute,
Object value)
属性を文字列全体に追加します。 |
void |
addAttribute(AttributedCharacterIterator.Attribute attribute,
Object value,
int beginIndex,
int endIndex)
属性を文字列の部分範囲に追加します。 |
void |
addAttributes(Map attributes,
int beginIndex,
int endIndex)
属性セットを文字列の部分範囲に追加します。 |
AttributedCharacterIterator |
getIterator()
文字列の内容全体へのアクセスを提供する、AttributedCharacterIterator のインスタンスを生成します。 |
AttributedCharacterIterator |
getIterator(AttributedCharacterIterator.Attribute[] attributes)
文字列の選択された内容へのアクセスを提供する、AttributedCharacterIterator のインスタンスを生成します。 |
AttributedCharacterIterator |
getIterator(AttributedCharacterIterator.Attribute[] attributes,
int beginIndex,
int endIndex)
文字列の選択された内容へのアクセスを提供する、AttributedCharacterIterator のインスタンスを生成します。 |
クラス java.lang.Object から継承したメソッド |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
コンストラクタの詳細 |
public AttributedString(String text)
text
- 属性付き文字列のテキストpublic AttributedString(String text, Map attributes)
text
- 属性付き文字列のテキストattributes
- 文字列全体に適用される属性public AttributedString(AttributedCharacterIterator text)
text
- 属性付き文字列のテキストpublic AttributedString(AttributedCharacterIterator text, int beginIndex, int endIndex)
text
- 属性付き文字列のテキストbeginIndex
- 範囲の先頭文字のインデックスendIndex
- 範囲の最終文字の次に来る文字のインデックスAnnotation
public AttributedString(AttributedCharacterIterator text, int beginIndex, int endIndex, AttributedCharacterIterator.Attribute[] attributes)
text
- 属性付き文字列のテキストbeginIndex
- 範囲の先頭文字のインデックスendIndex
- 範囲の最終文字の次に来る文字のインデックスattributes
- テキストから抽出される属性。null を指定すると、利用可能なすべての属性が使用されるAnnotation
メソッドの詳細 |
public void addAttribute(AttributedCharacterIterator.Attribute attribute, Object value)
attribute
- 属性キーvalue
- 属性の値。null の場合もあるpublic void addAttribute(AttributedCharacterIterator.Attribute attribute, Object value, int beginIndex, int endIndex)
attribute
- 属性キーvalue
- 属性の値。null の場合もあるbeginIndex
- 範囲の先頭文字のインデックスendIndex
- 範囲の最終文字の次に来る文字のインデックスpublic void addAttributes(Map attributes, int beginIndex, int endIndex)
attributes
- 文字列に追加する属性beginIndex
- 範囲の先頭文字のインデックスendIndex
- 範囲の最終文字の次に来る文字のインデックスpublic AttributedCharacterIterator getIterator()
public AttributedCharacterIterator getIterator(AttributedCharacterIterator.Attribute[] attributes)
attributes
- クライアントが関心を持つ属性のリストpublic AttributedCharacterIterator getIterator(AttributedCharacterIterator.Attribute[] attributes, int beginIndex, int endIndex)
attributes
- クライアントが関心を持つ属性のリストbeginIndex
- 先頭文字のインデックスendIndex
- 最後の文字の次に来る文字のインデックス
|
Java プラットフォーム 1.2 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |