| 
JavaTM 2 Platform Std. Ed. v1.4.0  | 
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
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 - 文字列全体に適用される属性
IllegalArgumentException - テキスト長が 0 で、属性パラメータが空の Map でない場合 (属性は長さ 0 の範囲には適用できない)public AttributedString(AttributedCharacterIterator text)
text - 属性付き文字列のテキスト
public AttributedString(AttributedCharacterIterator text,
                        int beginIndex,
                        int endIndex)
text - 属性付き文字列のテキストbeginIndex - 範囲の先頭文字のインデックスendIndex - 範囲の最終文字の次に来る文字のインデックス
IllegalArgumentException - beginIndex と endIndex によって指定される部分範囲がテキスト範囲外にある場合Annotation
public AttributedString(AttributedCharacterIterator text,
                        int beginIndex,
                        int endIndex,
                        AttributedCharacterIterator.Attribute[] attributes)
text - 属性付き文字列のテキストbeginIndex - 範囲の先頭文字のインデックスendIndex - 範囲の最終文字の次に来る文字のインデックスattributes - テキストから抽出される属性。null を指定すると、利用可能なすべての属性が使用される
IllegalArgumentException - beginIndex と endIndex によって指定される部分範囲がテキスト範囲外にある場合Annotation| メソッドの詳細 | 
public void addAttribute(AttributedCharacterIterator.Attribute attribute,
                         Object value)
attribute - 属性キーvalue - 属性の値。null の場合もある
IllegalArgumentException - AttributedString の長さが 0 の場合 (属性は長さ 0 の範囲には適用できない)
public void addAttribute(AttributedCharacterIterator.Attribute attribute,
                         Object value,
                         int beginIndex,
                         int endIndex)
attribute - 属性キーvalue - 属性の値。null の場合もあるbeginIndex - 範囲の先頭文字のインデックスendIndex - 範囲の最終文字の次に来る文字のインデックス
IllegalArgumentException - beginIndex が 0 より小さい場合、endIndex が文字列長より大きい場合、または beginIndex と endIndex の組み合わせが文字列の空でない部分範囲を定義しない場合
public void addAttributes(Map attributes,
                          int beginIndex,
                          int endIndex)
attributes - 文字列に追加する属性beginIndex - 範囲の先頭文字のインデックスendIndex - 範囲の最終文字の次に来る文字のインデックス
IllegalArgumentException - beginIndex が 0 より小さい場合、endIndex が文字列長より大きい場合、または beginIndex と endIndex の組み合わせが文字列の空でない部分範囲を定義せず属性パラメータが空の Map でない場合public AttributedCharacterIterator getIterator()
public AttributedCharacterIterator getIterator(AttributedCharacterIterator.Attribute[] attributes)
attributes - クライアントが関心を持つ属性のリスト
public AttributedCharacterIterator getIterator(AttributedCharacterIterator.Attribute[] attributes,
                                               int beginIndex,
                                               int endIndex)
attributes - クライアントが関心を持つ属性のリストbeginIndex - 先頭文字のインデックスendIndex - 最後の文字の次に来る文字のインデックス
IllegalArgumentException - beginIndex が 0 より小さい場合、endIndex が文字列長より大きい場合、または beginIndex が endIndex よりも大きい場合
  | 
JavaTM 2 Platform Std. Ed. v1.4.0  | 
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
 Java、Java 2D、および JDBC は米国ならびにその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
 Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A.  All Rights Reserved.