Java プラットフォーム 1.2

インタフェース
javax.swing.text.AttributeSet の使用

AttributeSet を使用するパッケージ
javax.accessibility ユーザインタフェースコンポーネントとそれらのコンポーネントへのアクセスを提供するユーザ補助機能との間の規約を定義します。 
javax.swing 可能な限りすべてのプラットフォームで同じように機能する「軽量」コンポーネント (Java 言語全体で共通) のセットを提供します。 
javax.swing.text 編集可能/編集不能テキストコンポーネントを処理するクラスとインタフェースを提供します。 
javax.swing.text.html HTML テキストエディタを作成するための HTMLEditorKit クラスとサポートクラスを提供します。  
 

javax.accessibility における AttributeSet の使用方法
 

AttributeSet を返す javax.accessibility におけるメソッド
 AttributeSet AccessibleText.getCharacterAttribute(int i)
          指定されたインデックスの位置にある指定された文字の AttributeSet を返します。
 

javax.swing における AttributeSet の使用方法
 

AttributeSet を返す javax.swing におけるメソッド
 AttributeSet JTextPane.getCharacterAttributes()
          現在のキャレット位置で有効な文字属性がある場合はそれを取得します。
 AttributeSet JTextPane.getParagraphAttributes()
          キャレット位置で有効な現在の段落属性がある場合はそれを取得します。
 

AttributeSet のパラメータを持つ javax.swing におけるメソッド
 void JTextPane.setCharacterAttributes(AttributeSet attr, boolean replace)
          指定された属性を文字コンテンツに適用します。
 void JTextPane.setParagraphAttributes(AttributeSet attr, boolean replace)
          指定された属性を段落に適用します。
 

javax.swing.text における AttributeSet の使用方法
 

javax.swing.text における AttributeSet のサブインタフェース
 interface MutableAttributeSet
          一意な属性を集めた可変コレクションの汎用インタフェースです。
 interface Style
          ドキュメント内の要素に関連付ける属性のコレクションです。
 

AttributeSet を実装する javax.swing.text におけるクラス
 class AbstractDocument.AbstractElement
          要素の抽象的な部分を実装します。
 class AbstractDocument.BranchElement
          他の要素を含む複合要素を実装します。
 class AbstractDocument.LeafElement
          内容を直接に表示する要素を実装します。
protected  class DefaultStyledDocument.SectionElement
          ドキュメントのデフォルトのルート要素です。
 class SimpleAttributeSet
          ハッシュテーブルを使用する、MutableAttributeSet の直接の実装です。
 class StyleContext.NamedStyle
          通常、文字および段落の書式を表すために使われる属性のコレクションです。
 class StyleContext.SmallAttributeSet
          このクラスは、少数の属性を配列として格納します。
 

AttributeSet として宣言される javax.swing.text におけるフィールド
protected  AttributeSet DefaultStyledDocument.AttributeUndoableEdit.newAttributes
           
protected  AttributeSet DefaultStyledDocument.AttributeUndoableEdit.copy
           
static AttributeSet SimpleAttributeSet.EMPTY
          空の属性セットです。
 

AttributeSet を返す javax.swing.text におけるメソッド
 AttributeSet JTextComponent.AccessibleJTextComponent.getCharacterAttribute(int i)
          インデックスで指定された文字の AttributeSet を返します。
 AttributeSet AttributeSet.copyAttributes()
          時間が経っても変化しないことが保証された属性セットを返します。
 AttributeSet AttributeSet.getResolveParent()
          解釈処理側の親を取得します。
 AttributeSet View.getAttributes()
          描画するときに使用する属性を取得します。
 AttributeSet Element.getAttributes()
          この要素が保持する属性のコレクションを取得します。
 AttributeSet AbstractDocument.AttributeContext.addAttribute(AttributeSet old, Object name, Object value)
          指定されたセットに属性を追加し、新しい属性セットを返します。
 AttributeSet AbstractDocument.AttributeContext.addAttributes(AttributeSet old, AttributeSet attr)
          要素に属性セットを追加します。
 AttributeSet AbstractDocument.AttributeContext.removeAttribute(AttributeSet old, Object name)
          セットから属性を削除します。
 AttributeSet AbstractDocument.AttributeContext.removeAttributes(AttributeSet old, Enumeration names)
          要素の属性セットを削除します。
 AttributeSet AbstractDocument.AttributeContext.removeAttributes(AttributeSet old, AttributeSet attrs)
          要素の属性セットを削除します。
 AttributeSet AbstractDocument.AttributeContext.getEmptySet()
          空の属性セットを取得します。
 AttributeSet AbstractDocument.AbstractElement.copyAttributes()
          属性セットをコピーします。
 AttributeSet AbstractDocument.AbstractElement.getResolveParent()
          解釈処理側の親を取得します。
 AttributeSet AbstractDocument.AbstractElement.getAttributes()
          要素の属性を取得します。
 AttributeSet DefaultStyledDocument.ElementSpec.getAttributes()
          要素の属性を取得します。
 AttributeSet SimpleAttributeSet.copyAttributes()
          属性のコピーを作成します。
 AttributeSet SimpleAttributeSet.getResolveParent()
          解釈処理側の親を取得します。
 AttributeSet StyleContext.addAttribute(AttributeSet old, Object name, Object value)
          指定されたセットに属性を追加し、その新しいセットを返します。
 AttributeSet StyleContext.addAttributes(AttributeSet old, AttributeSet attr)
          属性セットを要素に追加します。
 AttributeSet StyleContext.removeAttribute(AttributeSet old, Object name)
          セットから属性を削除します。
 AttributeSet StyleContext.removeAttributes(AttributeSet old, Enumeration names)
          要素の属性セットを削除します。
 AttributeSet StyleContext.removeAttributes(AttributeSet old, AttributeSet attrs)
          要素の属性セットを削除します。
 AttributeSet StyleContext.getEmptySet()
          空の属性セットを取得します。
 AttributeSet StyleContext.SmallAttributeSet.copyAttributes()
          属性セットをコピーします。
 AttributeSet StyleContext.SmallAttributeSet.getResolveParent()
          オーバーライドしない場合、解決する親のデフォルトはこの親要素になります。
 AttributeSet StyleContext.NamedStyle.copyAttributes()
          属性セットをコピーします。
 AttributeSet StyleContext.NamedStyle.getResolveParent()
          親から属性を取得します。
 

AttributeSet のパラメータを持つ javax.swing.text におけるメソッド
 boolean AttributeSet.isEqual(AttributeSet attr)
          2 つの属性セットが等しいかどうかを判定します。
 boolean AttributeSet.containsAttributes(AttributeSet attributes)
          等しい値の属性がすべてセットに含まれている場合に、true を返します。
static int StyleConstants.getBidiLevel(AttributeSet a)
          BIDI レベルの設定を取得します。
static Component StyleConstants.getComponent(AttributeSet a)
          属性リストからコンポーネントの設定を取得します。
static Icon StyleConstants.getIcon(AttributeSet a)
          属性リストからアイコンの設定を取得します。
static String StyleConstants.getFontFamily(AttributeSet a)
          属性リストからフォントファミリの設定を取得します。
static int StyleConstants.getFontSize(AttributeSet a)
          属性リストからフォントサイズの設定を取得します。
static boolean StyleConstants.isBold(AttributeSet a)
          ボールド属性が設定されているかどうかを判定します。
static boolean StyleConstants.isItalic(AttributeSet a)
          イタリック属性が設定されているかどうかを判定します。
static boolean StyleConstants.isUnderline(AttributeSet a)
          下線属性が設定されているかどうかを判定します。
static boolean StyleConstants.isStrikeThrough(AttributeSet a)
          取り消し線属性が設定されているかどうかを判定します。
static boolean StyleConstants.isSuperscript(AttributeSet a)
          上付き文字線属性が設定されているかどうかを判定します。
static boolean StyleConstants.isSubscript(AttributeSet a)
          下付き文字属性が設定されているかどうかを判定します。
static Color StyleConstants.getForeground(AttributeSet a)
          属性リストからフォアグラウンドカラーの設定を取得します。
static Color StyleConstants.getBackground(AttributeSet a)
          属性リストからバックグラウンドカラーの設定を取得します。
static float StyleConstants.getFirstLineIndent(AttributeSet a)
          最初の行のインデント設定を取得します。
static float StyleConstants.getRightIndent(AttributeSet a)
          右インデントの設定を取得します。
static float StyleConstants.getLeftIndent(AttributeSet a)
          左インデントの設定を取得します。
static float StyleConstants.getLineSpacing(AttributeSet a)
          行間隔の設定を取得します。
static float StyleConstants.getSpaceAbove(AttributeSet a)
          上のスペースの設定を取得します。
static float StyleConstants.getSpaceBelow(AttributeSet a)
          下のスペースの設定を取得します。
static int StyleConstants.getAlignment(AttributeSet a)
          配置方法の設定を取得します。
static TabSet StyleConstants.getTabSet(AttributeSet a)
          タブセットを取得します。
protected  void StyledEditorKit.StyledTextAction.setCharacterAttributes(JEditorPane editor, AttributeSet attr, boolean replace)
          指定された属性を文字コンテンツに適用します。
protected  void StyledEditorKit.StyledTextAction.setParagraphAttributes(JEditorPane editor, AttributeSet attr, boolean replace)
          指定された属性を段落に適用します。
protected  void CompositeView.setParagraphInsets(AttributeSet attr)
          指定された属性から選ばれた段落属性から、インセットを設定します。
 void AbstractDocument.insertString(int offs, String str, AttributeSet a)
          ドキュメントに内容を挿入します。
protected  void AbstractDocument.insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr)
          テキスト挿入の結果として、ドキュメントの構造を更新します。
protected  Element AbstractDocument.createLeafElement(Element parent, AttributeSet a, int p0, int p1)
          ドキュメントの葉の要素を作成します。
protected  Element AbstractDocument.createBranchElement(Element parent, AttributeSet a)
          ドキュメントの枝の要素を作成します。
protected  void PlainDocument.insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr)
          ドキュメント構造をテキスト挿入の結果で更新します。
 void StyledDocument.setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace)
          ドキュメント内の指定された範囲の既存のコンテンツに使用されているコンテンツ要素属性を変更します。
 void StyledDocument.setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace)
          段落の属性を設定します。
 Color StyledDocument.getForeground(AttributeSet attr)
          属性セットをフォアグラウンドカラーの属性に変換します。
 Color StyledDocument.getBackground(AttributeSet attr)
          属性セットをバックグラウンドカラーの属性に変換します。
 Font StyledDocument.getFont(AttributeSet attr)
          属性セットをフォントの属性に変換します。
 void MutableAttributeSet.addAttributes(AttributeSet attributes)
          指定された属性と値を持つことを除いて、これと同じ新しい属性セットを作成します。
 void MutableAttributeSet.removeAttributes(AttributeSet attributes)
          指定された名前と値のどれかを持つ属性を保持しないことを除いて、これと同じ新しい属性セットを作成します。
 void MutableAttributeSet.setResolveParent(AttributeSet parent)
          解釈処理側の親を設定します。
 AttributeSet AbstractDocument.AttributeContext.addAttribute(AttributeSet old, Object name, Object value)
          指定されたセットに属性を追加し、新しい属性セットを返します。
 AttributeSet AbstractDocument.AttributeContext.addAttributes(AttributeSet old, AttributeSet attr)
          要素に属性セットを追加します。
 AttributeSet AbstractDocument.AttributeContext.removeAttribute(AttributeSet old, Object name)
          セットから属性を削除します。
 AttributeSet AbstractDocument.AttributeContext.removeAttributes(AttributeSet old, Enumeration names)
          要素の属性セットを削除します。
 AttributeSet AbstractDocument.AttributeContext.removeAttributes(AttributeSet old, AttributeSet attrs)
          要素の属性セットを削除します。
 void AbstractDocument.AttributeContext.reclaim(AttributeSet a)
          属性セットを再生します。
 boolean AbstractDocument.AbstractElement.isEqual(AttributeSet attr)
          2 つの属性セットが等しいかどうかを判定します。
 boolean AbstractDocument.AbstractElement.containsAttributes(AttributeSet attrs)
          要素に属性がすべて含まれているかどうかを判定します。
 void AbstractDocument.AbstractElement.addAttributes(AttributeSet attr)
          要素に属性セットを追加します。
 void AbstractDocument.AbstractElement.removeAttributes(AttributeSet attrs)
          要素の属性セットを削除します。
 void AbstractDocument.AbstractElement.setResolveParent(AttributeSet parent)
          解釈処理側の親を設定します。
 void DefaultStyledDocument.setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace)
          ドキュメントの一部に属性を設定します。
 void DefaultStyledDocument.setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace)
          段落に属性を設定します。
protected  void DefaultStyledDocument.insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr)
          テキスト挿入の結果としてドキュメント構造を更新します。
 Color DefaultStyledDocument.getForeground(AttributeSet attr)
          属性セットからフォアグラウンドカラーを取得します。
 Color DefaultStyledDocument.getBackground(AttributeSet attr)
          属性セットからバックグラウンドカラーを取得します。
 Font DefaultStyledDocument.getFont(AttributeSet attr)
          属性セットからフォントを取得します。
 boolean SimpleAttributeSet.isEqual(AttributeSet attr)
          2 つの属性セットを比較します。
 boolean SimpleAttributeSet.containsAttributes(AttributeSet attributes)
          属性リストに指定されたすべての名前と値のペアがあるかどうかを判定します。
 void SimpleAttributeSet.addAttributes(AttributeSet attributes)
          属性セットをリストに追加します。
 void SimpleAttributeSet.removeAttributes(AttributeSet attributes)
          リストから属性セットを削除します。
 void SimpleAttributeSet.setResolveParent(AttributeSet parent)
          解釈処理側の親を設定します。
protected  void AbstractWriter.writeAttributes(AttributeSet attr)
          属性セットを "<名前>=<値>" のペアとして書き出します。
 void Document.insertString(int offset, String str, AttributeSet a)
          コンテンツの文字列を挿入します。
 Font StyleContext.getFont(AttributeSet attr)
          属性セットからフォントを取得します。
 Color StyleContext.getForeground(AttributeSet attr)
          属性セットをフォアグラウンドカラーの指定に変換します。
 Color StyleContext.getBackground(AttributeSet attr)
          属性セットをバックグラウンドカラーの指定に変換します。
 AttributeSet StyleContext.addAttribute(AttributeSet old, Object name, Object value)
          指定されたセットに属性を追加し、その新しいセットを返します。
 AttributeSet StyleContext.addAttributes(AttributeSet old, AttributeSet attr)
          属性セットを要素に追加します。
 AttributeSet StyleContext.removeAttribute(AttributeSet old, Object name)
          セットから属性を削除します。
 AttributeSet StyleContext.removeAttributes(AttributeSet old, Enumeration names)
          要素の属性セットを削除します。
 AttributeSet StyleContext.removeAttributes(AttributeSet old, AttributeSet attrs)
          要素の属性セットを削除します。
 void StyleContext.reclaim(AttributeSet a)
          MutableAttributeSet の実装によって必要とされなくなったセットを返します。
protected  StyleContext.SmallAttributeSet StyleContext.createSmallAttributeSet(AttributeSet a)
          共有可能でコンパクトな属性セットを作成します。
protected  MutableAttributeSet StyleContext.createLargeAttributeSet(AttributeSet a)
          メモリ効率より処理時間を優先する場合のための、大きいサイズの属性セットを作成します。
 void StyleContext.writeAttributes(ObjectOutputStream out, AttributeSet a)
          属性を書き込むコンテキスト固有の処理です。
static void StyleContext.writeAttributeSet(ObjectOutputStream out, AttributeSet a)
          直列化のために、指定されたオブジェクトストリームに属性セットを書き込みます。
 boolean StyleContext.SmallAttributeSet.isEqual(AttributeSet attr)
          2 つの属性セットが等しいかどうかを判定します。
 boolean StyleContext.SmallAttributeSet.containsAttributes(AttributeSet attrs)
          属性セットが、指定された属性をすべて含んでいるかどうかを判定します。
 boolean StyleContext.NamedStyle.isEqual(AttributeSet attr)
          2 つの属性セットが同じかどうかを判定します。
 boolean StyleContext.NamedStyle.containsAttributes(AttributeSet attrs)
          要素にすべての属性が含まれているかどうかを判定します。
 void StyleContext.NamedStyle.addAttributes(AttributeSet attr)
          要素に属性セットを追加します。
 void StyleContext.NamedStyle.removeAttributes(AttributeSet attrs)
          要素の属性セットを削除します。
 void StyleContext.NamedStyle.setResolveParent(AttributeSet parent)
          解釈処理側の親を設定します。
 

AttributeSet のパラメータを持つ javax.swing.text におけるコンストラクタ
AbstractDocument.AbstractElement.AbstractDocument.AbstractElement(Element parent, AttributeSet a)
          新しい AbstractElement を作成します。
AbstractDocument.BranchElement.AbstractDocument.BranchElement(Element parent, AttributeSet a)
          初期状態では子を持たない複合要素を構築します。
AbstractDocument.LeafElement.AbstractDocument.LeafElement(Element parent, AttributeSet a, int offs0, int offs1)
          ドキュメントの内容を表示する要素を構築します。
DefaultStyledDocument.ElementSpec.DefaultStyledDocument.ElementSpec(AttributeSet a, short type)
          マークアップがドキュメントに格納されないときに、マークアップに有用なコンストラクタです。
DefaultStyledDocument.ElementSpec.DefaultStyledDocument.ElementSpec(AttributeSet a, short type, int len)
          データは追加済みだが長さの情報が必要なときに、ドキュメント内の解析に使うコンストラクタです。
DefaultStyledDocument.ElementSpec.DefaultStyledDocument.ElementSpec(AttributeSet a, short type, char[] txt, int offs, int len)
          コンテンツとマークアップをドキュメントにバッチ入力するためのスペックを外部に作成するのに使うコンストラクタです。
DefaultStyledDocument.AttributeUndoableEdit.DefaultStyledDocument.AttributeUndoableEdit(Element element, AttributeSet newAttributes, boolean isReplacing)
           
SimpleAttributeSet.SimpleAttributeSet(AttributeSet source)
          指定された属性セットに基づいて新しい属性セットを作成します。
StyleContext.SmallAttributeSet.StyleContext.SmallAttributeSet(AttributeSet attrs)
           
 

javax.swing.text.html における AttributeSet の使用方法
 

AttributeSet を実装する javax.swing.text.html におけるクラス
 class HTMLDocument.BlockElement
          HTML の構造「ブロック」を表す要素です。
 class HTMLDocument.RunElement
          HTML 文字レベル属性のセットが割り当てられているテキストのチャンクを表す要素です。
 

AttributeSet を返す javax.swing.text.html におけるメソッド
 AttributeSet ParagraphView.getAttributes()
          描画で使用する属性を取得します。
 AttributeSet Option.getAttributes()
          オプションに関連付けられた属性を取得します。
 AttributeSet BlockView.getAttributes()
          描画時に使用する属性を取得します。
 AttributeSet InlineView.getAttributes()
          描画で使用する属性を取得します。
 AttributeSet StyleSheet.getDeclaration(String decl)
          CSS 宣言を、CSS 宣言を表す属性セットに変換します。
 AttributeSet StyleSheet.getViewAttributes(View v)
          ビューで表示のために使用される属性セットを取得します。
 AttributeSet StyleSheet.translateHTMLToCSS(AttributeSet htmlAttrSet)
          HTML 属性のセットを、対応する CSS 属性のセットに変換します。
abstract  AttributeSet HTMLDocument.Iterator.getAttributes()
          このタグの属性を取得します。
 AttributeSet HTMLDocument.RunElement.getResolveParent()
          解決処理側の親を取得します。
 AttributeSet HTMLDocument.BlockElement.getResolveParent()
          解決処理側の親を取得します。
 

AttributeSet のパラメータを持つ javax.swing.text.html におけるメソッド
protected  void MinimalHTMLWriter.writeAttributes(AttributeSet attr)
          次の型用のすべての属性を書き出します。
protected  void MinimalHTMLWriter.writeHTMLTags(AttributeSet attr)
          属性設定に基づいてテキストのボールド <b>、イタリック <i>、および <u> のタグ生成を制御します。
protected  void MinimalHTMLWriter.writeNonHTMLAttributes(AttributeSet attr)
          HTML 準拠の方法でキャラクタレベル属性 (ボールド、イタリック、アンダーライン以外の属性) の書き出しを制御します。
protected  void HTMLWriter.writeAttributes(AttributeSet attr)
          属性セットを書き出します。
protected  boolean HTMLWriter.isBlockTag(AttributeSet attr)
          要素に対応する HTML タグが block タグかどうかを判定します。
protected  void HTMLWriter.textAreaContent(AttributeSet attr)
          フォーム要素の TEXTAREA に格納されているテキストを書き出します。
protected  void HTMLWriter.selectContent(AttributeSet attr)
          フォーム要素の SELECT のコンテンツを書き出します。
protected  boolean HTMLWriter.matchNameAttribute(AttributeSet attr, HTML.Tag tag)
          StyleConstants.NameAttribute がパラメータとして渡されるタグに等しい場合は true を返します。
protected  void HTMLWriter.writeEmbeddedTags(AttributeSet attr)
          AttributeSet で組み込みタグを検索してそれを書き出します。
protected  void HTMLWriter.closeOutUnwantedEmbeddedTags(AttributeSet attr)
          属性セットおよびタグベクタに格納された各タグを検索します。
 Font StyleSheet.getFont(AttributeSet a)
          属性セットで使用するフォントを取得します。
 Color StyleSheet.getForeground(AttributeSet a)
          属性セットを取得してフォアグラウンドカラー指定に変換します。
 Color StyleSheet.getBackground(AttributeSet a)
          属性セットを取得してバックグラウンドカラー指定に変換します。
 StyleSheet.BoxPainter StyleSheet.getBoxPainter(AttributeSet a)
          CSS 属性のセットで使用するボックスフォーマッタを取得します。
 StyleSheet.ListPainter StyleSheet.getListPainter(AttributeSet a)
          CSS 属性のセットで使用するリストフォーマッタを取得します。
 AttributeSet StyleSheet.translateHTMLToCSS(AttributeSet htmlAttrSet)
          HTML 属性のセットを、対応する CSS 属性のセットに変換します。
protected  void HTMLDocument.insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr)
          テキストの挿入に応じてドキュメントを更新します。
protected  Element HTMLDocument.createLeafElement(Element parent, AttributeSet a, int p0, int p1)
          テキストを直接表す (子を持たない) ドキュメントの葉の要素を作成します。
protected  Element HTMLDocument.createBranchElement(Element parent, AttributeSet a)
          他の要素を格納できるドキュメントの枝の要素を作成します。
static int HTML.getIntegerAttributeValue(AttributeSet attr, HTML.Attribute key, int def)
          整数型の属性値を取得します。
 

AttributeSet のパラメータを持つ javax.swing.text.html におけるコンストラクタ
Option.Option(AttributeSet attr)
          新しい Option オブジェクトを作成します。
HTMLDocument.RunElement.HTMLDocument.RunElement(Element parent, AttributeSet a, int offs0, int offs1)
          ドキュメント内のコンテンツを表す (子を持たない) 要素を作成します。
HTMLDocument.BlockElement.HTMLDocument.BlockElement(Element parent, AttributeSet a)
          最初は子を含まない、複合要素を作成します。
 


Java プラットフォーム 1.2

バグや機能要求の報告
新しい javadoc の表示についてのコメントやご提案
Java は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.