JavaTM 2 Platform
Std. Ed. v1.3

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

Element を使用しているパッケージ
javax.swing すべてのプラットフォームで可能な限り同じように機能する、「軽量」(Java 共通言語) コンポーネントのセットを提供します。 
javax.swing.event Swing コンポーネントによってトリガーされるイベントを提供します。 
javax.swing.plaf.basic 基本 Look & Feel に従って作成されたユーザインタフェースオブジェクトを提供します。 
javax.swing.text 編集可能/編集不能テキストコンポーネントを処理するクラスとインタフェースを提供します。 
javax.swing.text.html HTML テキストエディタを作成するための HTMLEditorKit クラスとサポートクラスを提供します。  
 

javax.swing での Element の使用
 

Element 型のパラメータを持つ javax.swing のコンストラクタ
JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink(Element e)
           
 

javax.swing.event での Element の使用
 

Element を返す javax.swing.event のメソッド
 Element DocumentEvent.ElementChange.getElement()
          表示された要素を返します。
 Element[] DocumentEvent.ElementChange.getChildrenRemoved()
          指定された親要素から削除された子要素を返します。
 Element[] DocumentEvent.ElementChange.getChildrenAdded()
          指定された親要素に追加された子要素を返します。
 

Element 型のパラメータを持つ javax.swing.event のメソッド
 DocumentEvent.ElementChange DocumentEvent.getChange(Element elem)
          指定された要素の変更情報を返します。
 

javax.swing.plaf.basic での Element の使用
 

Element 型のパラメータを持つ javax.swing.plaf.basic のメソッド
 View BasicTextUI.create(Element elem)
          要素のビューを作成します。
 View BasicTextUI.create(Element elem, int p0, int p1)
          要素のビューを作成します。
 View BasicTextFieldUI.create(Element elem)
          要素に基づいてビュー (FieldView) を作成します。
 View BasicPasswordFieldUI.create(Element elem)
          要素のビュー (PasswordView) を作成します。
 View BasicTextAreaUI.create(Element elem)
          要素のビューを作成します。
 

javax.swing.text での Element の使用
 

Element を実装している javax.swing.text のクラス
 class AbstractDocument.AbstractElement
          要素の抽象的な部分を実装します。
 class AbstractDocument.BranchElement
          他の要素を含む複合要素を実装します。
 class AbstractDocument.LeafElement
          内容を直接に表示する要素を実装します。
protected  class DefaultStyledDocument.SectionElement
          ドキュメントのデフォルトのルート要素です。
 

Element として宣言されている javax.swing.text のフィールド
protected  Element DefaultStyledDocument.AttributeUndoableEdit.element
           
 

Element を返す javax.swing.text のメソッド
 Element ElementIterator.first()
          先頭の要素を取り出します。
 Element ElementIterator.current()
          現在の Element を取り出します。
 Element ElementIterator.next()
          次の Element を取り出します。
 Element ElementIterator.previous()
          直前の Element を取り出します。
 Element View.getElement()
          このビューがマッピングされる対象の構造部分を取り出します。
 Element Element.getParentElement()
          親要素を取り出します。
 Element Element.getElement(int index)
          指定されたインデックスの子要素を取り出します。
 Element[] Document.getRootElements()
          定義されているすべてのルート要素を返します。
 Element Document.getDefaultRootElement()
          ビューを要素構造に割り当てるほかの特定の機構が提供されていないかぎり、ビューのベースとなるルート要素を返します。
 Element[] AbstractDocument.getRootElements()
          定義されているルート要素をすべて返します。
abstract  Element AbstractDocument.getDefaultRootElement()
          ルート要素を返します。
 Element AbstractDocument.getBidiRootElement()
          ドキュメントの双方向構造のルート要素を返します。
abstract  Element AbstractDocument.getParagraphElement(int pos)
          指定された位置を含む段落要素を返します。
protected  Element AbstractDocument.createLeafElement(Element parent, AttributeSet a, int p0, int p1)
          ドキュメントの葉の要素を作成します。
protected  Element AbstractDocument.createBranchElement(Element parent, AttributeSet a)
          ドキュメントの枝の要素を作成します。
 Element AbstractDocument.AbstractElement.getParentElement()
          要素の親を取得します。
abstract  Element AbstractDocument.AbstractElement.getElement(int index)
          子要素を取得します。
 Element AbstractDocument.BranchElement.positionToElement(int pos)
          指定されたモデル位置に含まれる子要素を取得します。
 Element AbstractDocument.BranchElement.getElement(int index)
          子要素を取得します。
 Element AbstractDocument.LeafElement.getElement(int index)
          子要素を取得します。
 Element AbstractDocument.ElementEdit.getElement()
          処理対象の要素を返します。
 Element[] AbstractDocument.ElementEdit.getChildrenRemoved()
          削除された子のリストを取得します。
 Element[] AbstractDocument.ElementEdit.getChildrenAdded()
          追加された子のリストを返します。
 Element StyledEditorKit.getCharacterAttributeRun()
          キャレットに対応する現在の文字属性を表す要素を取り出します。
 Element StyledDocument.getParagraphElement(int pos)
          ドキュメント内の指定されたオフセットを含む段落を表す要素を返します。
 Element StyledDocument.getCharacterElement(int pos)
          ドキュメント内の指定されたオフセットにある文字を表す要素を返します。
 Element PlainDocument.getDefaultRootElement()
          ドキュメントモデルのデフォルトのルート要素を返します。
 Element PlainDocument.getParagraphElement(int pos)
          指定された位置を保持する段落要素を返します。
static Element Utilities.getParagraphElement(JTextComponent c, int offs)
          段落または行に使用する要素を指定します。
 Element DefaultStyledDocument.getDefaultRootElement()
          デフォルトのルート要素を返します。
 Element DefaultStyledDocument.getParagraphElement(int pos)
          オフセット pos の段落の要素を返します。
 Element DefaultStyledDocument.getCharacterElement(int pos)
          位置に基づいて文字要素を返します。
 Element DefaultStyledDocument.ElementBuffer.getRootElement()
          ルート要素を取得します。
 Element DefaultStyledDocument.ElementBuffer.clone(Element parent, Element clonee)
          この要素のコピーを、異なる親を使って作成します。
 

Element 型のパラメータを持つ javax.swing.text のメソッド
 View ViewFactory.create(Element elem)
          ドキュメントの指定された構造要素からビューを作成します。
protected  boolean AbstractWriter.inRange(Element next)
          このメソッドは、現在の要素が指定された範囲内にあるかどうかを判定します。
protected  String AbstractWriter.getText(Element elem)
          要素に関連したテキストを返します。
protected  void AbstractWriter.text(Element elem)
          テキストを書き出します。
protected  Element AbstractDocument.createLeafElement(Element parent, AttributeSet a, int p0, int p1)
          ドキュメントの葉の要素を作成します。
protected  Element AbstractDocument.createBranchElement(Element parent, AttributeSet a)
          ドキュメントの枝の要素を作成します。
 void AbstractDocument.BranchElement.replace(int offset, int length, Element[] elems)
          内容を新しい要素セットで置き換えます。
 DocumentEvent.ElementChange AbstractDocument.DefaultDocumentEvent.getChange(Element elem)
          要素への変更を取得します。
protected  void StyledEditorKit.createInputAttributes(Element element, MutableAttributeSet set)
          element の AttributeSet 内のキーと値のペアを set にコピーします。
protected  TableView.TableRow TableView.createTableRow(Element elem)
          新しいテーブル行を作成します。
protected  TableView.TableCell TableView.createTableCell(Element elem)
          推奨されていません。 テーブルセルは任意の View 実装となることができますが、テーブルではなく ViewFactory によって作成されるようにします。
 Element DefaultStyledDocument.ElementBuffer.clone(Element parent, Element clonee)
          この要素のコピーを、異なる親を使って作成します。
 

Element 型のパラメータを持つ javax.swing.text のコンストラクタ
ElementIterator(Element root)
          新しい ElementIterator を作成します。
View(Element elem)
          新しい View オブジェクトを作成します。
CompositeView(Element elem)
          指定された要素の CompositeView を構築します。
GlyphView(Element elem)
          要素にラップされた新しいビューを作成します。
LabelView(Element elem)
          要素にラップされた新しいビューを作成します。
BoxView(Element elem, int axis)
          BoxView を構築します。
FlowView(Element elem, int axis)
          指定された要素の FlowView を作成します。
ParagraphView(Element elem)
          指定された要素の ParagraphView を構築します。
AbstractWriter(Writer w, Element root)
          新しい AbstractWriter を作成します。
AbstractWriter(Writer w, Element root, int pos, int len)
          新しい AbstractWriter を作成します。
PlainView(Element elem)
          要素でラップされた新しい PlainView を構築します。
FieldView(Element elem)
          ラップした新しい FieldView を要素で構築します。
AbstractDocument.AbstractElement(Element parent, AttributeSet a)
          新しい AbstractElement を作成します。
AbstractDocument.BranchElement(Element parent, AttributeSet a)
          初期状態では子を持たない複合要素を構築します。
AbstractDocument.LeafElement(Element parent, AttributeSet a, int offs0, int offs1)
          ドキュメントの内容を表示する要素を構築します。
AbstractDocument.ElementEdit(Element e, int index, Element[] removed, Element[] added)
          編集のレコードを構築します。
PasswordView(Element elem)
          要素にラップされた新しいビューを作成します。
AsyncBoxView(Element elem, int axis)
          非同期レイアウトを行うボックスビューを構築します。
TableView(Element elem)
          指定された要素の TableView を作成します。
TableView.TableRow(Element elem)
          指定された要素の TableView を作成します。
TableView.TableCell(Element elem)
          推奨されていません。 指定された要素のテーブルセルを構築します。
ComponentView(Element elem)
          新しい ComponentView オブジェクトを作成します。
IconView(Element elem)
          要素を表現する新しいアイコンビューを作成します。
WrappedPlainView(Element elem)
          新しい WrappedPlainView を作成します。
WrappedPlainView(Element elem, boolean wordWrap)
          新しい WrappedPlainView を作成します。
ZoneView(Element elem, int axis)
          ZoneView を構築します。
DefaultStyledDocument.ElementBuffer(Element root)
          新しい ElementBuffer を作成します。
DefaultStyledDocument.AttributeUndoableEdit(Element element, AttributeSet newAttributes, boolean isReplacing)
           
 

javax.swing.text.html での Element の使用
 

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

Element を返す javax.swing.text.html のメソッド
 Element HTMLFrameHyperlinkEvent.getSourceElement()
          イベントのソースに対応する要素を返します。
protected  Element HTMLDocument.createLeafElement(Element parent, AttributeSet a, int p0, int p1)
          テキストを直接表す (子を持たない) ドキュメントの葉の要素を作成します。
protected  Element HTMLDocument.createBranchElement(Element parent, AttributeSet a)
          他の要素を格納できるドキュメントの枝の要素を作成します。
 Element HTMLDocument.getElement(String id)
          指定された id 属性を含んだ要素を取り出します。
 Element HTMLDocument.getElement(Element e, Object attribute, Object value)
          属性を持った e の子要素である value 値を含む attribute を返します。
protected  Element[] HTMLEditorKit.HTMLTextAction.getElementsAt(HTMLDocument doc, int offset)
          offset が格納されている Element の配列を返します。
protected  Element HTMLEditorKit.HTMLTextAction.findElementMatchingTag(HTMLDocument doc, int offset, HTML.Tag tag)
          offset の位置で、 tag に一致するもっとも深い要素を返します。
 

Element 型のパラメータを持つ javax.swing.text.html のメソッド
 Style StyleSheet.getRule(HTML.Tag t, Element e)
          指定されたタイプの HTML タグを描画するためのスタイルを取り出します。
protected  Element HTMLDocument.createLeafElement(Element parent, AttributeSet a, int p0, int p1)
          テキストを直接表す (子を持たない) ドキュメントの葉の要素を作成します。
protected  Element HTMLDocument.createBranchElement(Element parent, AttributeSet a)
          他の要素を格納できるドキュメントの枝の要素を作成します。
 void HTMLDocument.setInnerHTML(Element elem, String htmlText)
          指定された要素の子を HTML 文字列として指定されたコンテンツと置き換えます。
 void HTMLDocument.setOuterHTML(Element elem, String htmlText)
          指定された親の要素を HTML 文字列として指定されたコンテンツと置き換えます。
 void HTMLDocument.insertAfterStart(Element elem, String htmlText)
          要素の開始位置に文字列として指定された HTML を挿入します。
 void HTMLDocument.insertBeforeEnd(Element elem, String htmlText)
          要素の終了位置に文字列として指定された HTML を挿入します。
 void HTMLDocument.insertBeforeStart(Element elem, String htmlText)
          指定された要素が開始される前に文字列として指定された HTML を挿入します。
 void HTMLDocument.insertAfterEnd(Element elem, String htmlText)
          指定要素が終了後に文字列として指定された HTML を挿入します。
 Element HTMLDocument.getElement(Element e, Object attribute, Object value)
          属性を持った e の子要素である value 値を含む attribute を返します。
protected  void HTMLEditorKit.createInputAttributes(Element element, MutableAttributeSet set)
          element の AttributeSet 内のキーと値のペアを set にコピーします。
protected  void HTMLWriter.emptyTag(Element elem)
          すべての空要素 (対応する終了タグのないタグすべて) を書き出します。
protected  void HTMLWriter.startTag(Element elem)
          要素の開始タグを書き出します。
protected  void HTMLWriter.text(Element elem)
          テキストを書き出します。
protected  void HTMLWriter.endTag(Element elem)
          要素の終了タグを書き出します。
protected  void HTMLWriter.comment(Element elem)
          コメントを書き出します。
protected  boolean HTMLWriter.synthesizedElement(Element elem)
          要素が合成要素の場合は true を返します。
protected  void MinimalHTMLWriter.text(Element elem)
          テキストを書き出します。
protected  void MinimalHTMLWriter.writeStartParagraph(Element elem)
          段落の開始タグを発行します。
protected  void MinimalHTMLWriter.writeLeaf(Element elem)
          テキスト以外の葉の要素の書き出しを制御します。
protected  void MinimalHTMLWriter.writeImage(Element elem)
          アイコン要素の書き出しを行います。
protected  void MinimalHTMLWriter.writeComponent(Element elem)
          コンポーネント要素の書き出しを行います。
protected  boolean MinimalHTMLWriter.isText(Element elem)
          要素がテキストなら true を返します。
protected  void MinimalHTMLWriter.writeContent(Element elem, boolean needsIndenting)
          HTML に準拠した方法で属性セットを書き出します。
 View HTMLEditorKit.HTMLFactory.create(Element elem)
          要素からビューを作成します。
protected  void HTMLEditorKit.InsertHTMLTextAction.insertAtBoundary(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag)
          境界に挿入するときに呼び出されます。
protected  void HTMLEditorKit.InsertHTMLTextAction.insertAtBoundry(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag)
          推奨されていません。 Java 2 プラットフォーム v1.3 においては insertAtBoundary を使用してください。
 

Element 型のパラメータを持つ javax.swing.text.html のコンストラクタ
ParagraphView(Element elem)
          指定された要素の ParagraphView を構築します。
BlockView(Element elem, int axis)
          HTML ボックスを表す新しいビューを作成します。
InlineView(Element elem)
          要素にラップされた新しいビューを作成します。
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, Element sourceElement, String targetFrame)
          ハイパーテキストリンクイベントを表す新しいオブジェクトを作成します。
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String desc, Element sourceElement, String targetFrame)
          ハイパーテキストリンクイベントを表す新しいオブジェクトを作成します。
HTMLDocument.RunElement(Element parent, AttributeSet a, int offs0, int offs1)
          ドキュメント内のコンテンツを表す (子を持たない) 要素を作成します。
HTMLDocument.BlockElement(Element parent, AttributeSet a)
          最初は子を含まない、複合要素を作成します。
FormView(Element elem)
          新しい FormView オブジェクトを作成します。
ObjectView(Element elem)
          新しい ObjectView オブジェクトを作成します。
ListView(Element elem)
          リスト要素を表す新しいビューを作成します。
 


JavaTM 2 Platform
Std. Ed. v1.3

バグや機能要求の報告
さらに詳しい API リファレンスおよび開発者ドキュメントについては、 Java 2 SDK SE Developer Documentation を参照してください。このドキュメントには、概念、用語の定義、回避策、 実用的なコード例など、開発者を対象にした詳細な解説が掲載されています。

Java、Java 2D、JDBC は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.