インタフェース
javax.swing.text.Elementの使用
| パッケージ | 説明 |
|---|---|
| javax.swing |
すべてのプラットフォーム上で可能なかぎり同じように機能する「軽量」(Java共通言語)コンポーネントのセットを提供します。
|
| javax.swing.event |
Swingコンポーネントによってトリガーされるイベントを提供します。
|
| javax.swing.plaf.basic |
基本Look & Feelに従って構築されたユーザー・インタフェース・オブジェクトを提供します。
|
| javax.swing.plaf.synth |
Synthは、すべてのペイントが委譲されるスキン設定可能なLook & Feelです。
|
| javax.swing.text |
編集可能なテキスト・コンポーネントと編集不能なテキスト・コンポーネントを処理するクラスとインタフェースを提供します。
|
| javax.swing.text.html |
HTMLテキスト・エディタを作成するためのクラス
HTMLEditorKitとサポート・クラスを提供します。 |
-
javax.swingでのElementの使用
Element型のパラメータを持つjavax.swing内のコンストラクタ コンストラクタ 説明 HTMLLink(Element e)HTMLLinkを構築します。 -
javax.swing.eventでのElementの使用
Elementを返すjavax.swing.event内のメソッド 修飾子と型 メソッド 説明 Element[]DocumentEvent.ElementChange. getChildrenAdded()指定された親要素に追加された子要素を返します。Element[]DocumentEvent.ElementChange. getChildrenRemoved()指定された親要素から削除された子要素を返します。ElementDocumentEvent.ElementChange. getElement()表示された要素を返します。ElementHyperlinkEvent. getSourceElement()イベントのソースに対応するElementを返します。Element型のパラメータを持つjavax.swing.event内のメソッド 修飾子と型 メソッド 説明 DocumentEvent.ElementChangeDocumentEvent. getChange(Element elem)指定された要素の変更情報を返します。Element型のパラメータを持つjavax.swing.event内のコンストラクタ コンストラクタ 説明 HyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL u, String desc, Element sourceElement)ハイパーテキスト・リンク・イベントを表す新しいオブジェクトを作成します。HyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL u, String desc, Element sourceElement, InputEvent inputEvent)ハイパーテキスト・リンク・イベントを表す新しいオブジェクトを作成します。 -
javax.swing.plaf.basicでのElementの使用
Element型のパラメータを持つjavax.swing.plaf.basic内のメソッド 修飾子と型 メソッド 説明 ViewBasicPasswordFieldUI. create(Element elem)要素のビュー(PasswordView)を作成します。ViewBasicTextAreaUI. create(Element elem)要素のビューを作成します。ViewBasicTextFieldUI. create(Element elem)要素に基づいてビュー(FieldView)を作成します。ViewBasicTextUI. create(Element elem)要素のビューを作成します。ViewBasicTextUI. create(Element elem, int p0, int p1)要素のビューを作成します。 -
javax.swing.plaf.synthでのElementの使用
Element型のパラメータを持つjavax.swing.plaf.synth内のメソッド 修飾子と型 メソッド 説明 ViewSynthPasswordFieldUI. create(Element elem)要素のビュー(PasswordView)を作成します。 -
javax.swing.textでのElementの使用
Elementを実装しているjavax.swing.text内のクラス 修飾子と型 クラス 説明 classAbstractDocument.AbstractElement要素の抽象部分を実装します。classAbstractDocument.BranchElementほかの要素を含む複合要素を実装します。classAbstractDocument.LeafElementある種のコンテンツを直接表す要素を実装します。protected classDefaultStyledDocument.SectionElementドキュメントのデフォルト・ルート要素で、含まれる段落や行をマッピングします。Elementとして宣言されているjavax.swing.text内のフィールド 修飾子と型 フィールド 説明 protected ElementDefaultStyledDocument.AttributeUndoableEdit. element影響を受ける要素。Elementを返すjavax.swing.text内のメソッド 修飾子と型 メソッド 説明 ElementDefaultStyledDocument.ElementBuffer. clone(Element parent, Element clonee)異なる親を使用して、この要素のコピーを作成します。protected ElementAbstractDocument. createBranchElement(Element parent, AttributeSet a)ドキュメントの枝の要素を作成します。この要素には、ほかの要素(複数可)を含めることができます。protected ElementAbstractDocument. createLeafElement(Element parent, AttributeSet a, int p0, int p1)ドキュメントの葉の要素を作成します。ElementElementIterator. current()現在のElementをフェッチします。ElementElementIterator. first()先頭の要素を取得します。ElementAbstractDocument. getBidiRootElement()ドキュメントの双方向構造のルート要素を返します。ElementStyledEditorKit. getCharacterAttributeRun()キャレットに対応する現在の文字属性を表す要素を取得します。ElementDefaultStyledDocument. getCharacterElement(int pos)位置に基づいて文字要素を取得します。ElementStyledDocument. getCharacterElement(int pos)ドキュメント内の指定されたオフセットにある文字を表す要素を返します。Element[]AbstractDocument.ElementEdit. getChildrenAdded()追加された子のリストを取得します。Element[]AbstractDocument.ElementEdit. getChildrenRemoved()削除された子のリストを取得します。abstract ElementAbstractDocument. getDefaultRootElement()ルート要素を返します。要素の構造にビューを割り当てる別のメカニズムが提供されないかぎり、このルート要素がビューのベースになります。ElementDefaultStyledDocument. getDefaultRootElement()デフォルトのルート要素が取得されます。ElementDocument. getDefaultRootElement()ルート要素を返します。要素の構造にビューを割り当てる別のメカニズムが提供されないかぎり、このルート要素がビューのベースになります。ElementPlainDocument. getDefaultRootElement()ドキュメント・モデルのデフォルトのルート要素を取得します。abstract ElementAbstractDocument.AbstractElement. getElement(int index)子要素を取得します。ElementAbstractDocument.BranchElement. getElement(int index)子要素を取得します。ElementAbstractDocument.ElementEdit. getElement()処理対象の要素を返します。ElementAbstractDocument.LeafElement. getElement(int index)子要素を取得します。ElementElement. getElement(int index)指定されたインデックスの子要素を取得します。ElementView. getElement()このビューがマッピングされる対象の構造部分を取り出します。abstract ElementAbstractDocument. getParagraphElement(int pos)指定された位置を保持する段落要素を取得します。ElementDefaultStyledDocument. getParagraphElement(int pos)オフセットposの段落の要素を取得します。ElementPlainDocument. getParagraphElement(int pos)指定された位置を保持する段落要素を取得します。ElementStyledDocument. getParagraphElement(int pos)ドキュメント内の指定されたオフセットを含む段落を表す要素を返します。static ElementUtilities. getParagraphElement(JTextComponent c, int offs)段落または行に使用する要素を指定します。ElementAbstractDocument.AbstractElement. getParentElement()要素の親を取得します。ElementElement. getParentElement()親要素を取得します。ElementDefaultStyledDocument.ElementBuffer. getRootElement()ルート要素を取得します。Element[]AbstractDocument. getRootElements()定義されているルート要素をすべて取得します。Element[]Document. getRootElements()定義されているすべてのルート要素を返します。ElementElementIterator. next()次のElementをフェッチします。ElementAbstractDocument.BranchElement. positionToElement(int pos)指定されたモデル位置を含む子要素を取得します。ElementElementIterator. previous()前のElementをフェッチします。Element型のパラメータを持つjavax.swing.text内のメソッド 修飾子と型 メソッド 説明 ElementDefaultStyledDocument.ElementBuffer. clone(Element parent, Element clonee)異なる親を使用して、この要素のコピーを作成します。ViewViewFactory. create(Element elem)ドキュメントの指定された構造要素からビューを作成します。protected ElementAbstractDocument. createBranchElement(Element parent, AttributeSet a)ドキュメントの枝の要素を作成します。この要素には、ほかの要素(複数可)を含めることができます。protected voidStyledEditorKit. createInputAttributes(Element element, MutableAttributeSet set)elementのAttributeSet内のキーと値のペアをsetにコピーします。protected ElementAbstractDocument. createLeafElement(Element parent, AttributeSet a, int p0, int p1)ドキュメントの葉の要素を作成します。protected TableView.TableCellTableView. createTableCell(Element elem)非推奨。テーブル・セルは任意のView実装となることができますが、テーブルではなく、ViewFactoryによって作成されるようにします。protected TableView.TableRowTableView. createTableRow(Element elem)新しいテーブル行を作成します。DocumentEvent.ElementChangeAbstractDocument.DefaultDocumentEvent. getChange(Element elem)要素の変更を取得します。protected StringAbstractWriter. getText(Element elem)要素に関連したテキストを返します。protected booleanAbstractWriter. inRange(Element next)このメソッドは、現在の要素が指定された範囲内にあるかどうかを判定します。voidDefaultStyledDocument. removeElement(Element elem)このドキュメントから要素を削除します。voidAbstractDocument.BranchElement. replace(int offset, int length, Element[] elems)コンテンツを要素の新規セットで置き換えます。protected voidAbstractWriter. text(Element elem)テキストを書き出します。Element型のパラメータを持つjavax.swing.text内のコンストラクタ コンストラクタ 説明 AbstractElement(Element parent, AttributeSet a)新しいAbstractElementを作成します。AbstractWriter(Writer w, Element root)新しいAbstractWriterを作成します。AbstractWriter(Writer w, Element root, int pos, int len)新しいAbstractWriterを作成します。AsyncBoxView(Element elem, int axis)非同期レイアウトを行うボックス・ビューを構築します。AttributeUndoableEdit(Element element, AttributeSet newAttributes, boolean isReplacing)AttributeUndoableEditを構築します。BoxView(Element elem, int axis)BoxViewを構築します。BranchElement(Element parent, AttributeSet a)最初は子を含まない、複合要素を作成します。ComponentView(Element elem)新しいComponentViewオブジェクトを作成します。CompositeView(Element elem)指定された要素のCompositeViewを構築します。ElementBuffer(Element root)新しいElementBufferを作成します。ElementEdit(Element e, int index, Element[] removed, Element[] added)編集のレコードを構築します。ElementIterator(Element root)新しいElementIteratorを作成します。FieldView(Element elem)ラップした新しいFieldViewを要素で構築します。FlowView(Element elem, int axis)指定された要素のFlowViewを作成します。GlyphView(Element elem)要素にラップされた新しいビューを作成します。IconView(Element elem)要素を表現する新しいアイコン・ビューを作成します。LabelView(Element elem)要素にラップされた新しいビューを作成します。LeafElement(Element parent, AttributeSet a, int offs0, int offs1)ドキュメント内のコンテンツを表す(子を持たない)要素を作成します。ParagraphView(Element elem)指定された要素のParagraphViewを構築します。PasswordView(Element elem)要素にラップされた新しいビューを作成します。PlainView(Element elem)要素でラップされた新しいPlainViewを構築します。TableCell(Element elem)非推奨。指定された要素のテーブル・セルを構築します。TableRow(Element elem)指定された要素のTableViewを作成します。TableView(Element elem)指定された要素のTableViewを作成します。View(Element elem)新しいViewオブジェクトを作成します。WrappedPlainView(Element elem)新しいWrappedPlainViewを作成します。WrappedPlainView(Element elem, boolean wordWrap)新しいWrappedPlainViewを作成します。ZoneView(Element elem, int axis)ZoneViewを構築します。 -
javax.swing.text.htmlでのElementの使用
Elementを実装しているjavax.swing.text.html内のクラス 修飾子と型 クラス 説明 classHTMLDocument.BlockElementHTMLの構造ブロックを表す要素です。classHTMLDocument.RunElementHTML文字レベル属性のセットが割り当てられているテキストのチャンクを表す要素です。Elementを返すjavax.swing.text.html内のメソッド 修飾子と型 メソッド 説明 protected ElementHTMLDocument. createBranchElement(Element parent, AttributeSet a)ドキュメントの枝の要素を作成します。この要素には、ほかの要素(複数可)を含めることができます。protected ElementHTMLDocument. createLeafElement(Element parent, AttributeSet a, int p0, int p1)テキストを直接表す(子を持たない)ドキュメントの葉の要素を作成します。protected ElementHTMLEditorKit.HTMLTextAction. findElementMatchingTag(HTMLDocument doc, int offset, HTML.Tag tag)tagに一致するoffsetに位置する、いちばん深い要素を返します。ElementHTMLDocument. getElement(String id)指定したidAttributeを持つ要素を返します。ElementHTMLDocument. getElement(Element e, Object attribute, Object value)属性(値valueを持つattribute)を格納するeの子要素を返します。見つからない場合はnullを返します。protected Element[]HTMLEditorKit.HTMLTextAction. getElementsAt(HTMLDocument doc, int offset)offsetを格納する要素から成る配列を返します。Element型のパラメータを持つjavax.swing.text.html内のメソッド 修飾子と型 メソッド 説明 protected voidHTMLWriter. comment(Element elem)コメントを書き出します。ViewHTMLEditorKit.HTMLFactory. create(Element elem)要素からビューを作成します。protected ElementHTMLDocument. createBranchElement(Element parent, AttributeSet a)ドキュメントの枝の要素を作成します。この要素には、ほかの要素(複数可)を含めることができます。protected voidHTMLEditorKit. createInputAttributes(Element element, MutableAttributeSet set)elementのAttributeSet内のキーと値のペアをsetにコピーします。protected ElementHTMLDocument. createLeafElement(Element parent, AttributeSet a, int p0, int p1)テキストを直接表す(子を持たない)ドキュメントの葉の要素を作成します。protected voidHTMLWriter. emptyTag(Element elem)すべての空要素(対応する終了タグのないタグすべて)を書き出します。protected voidHTMLWriter. endTag(Element elem)要素の終了タグを書き出します。ElementHTMLDocument. getElement(Element e, Object attribute, Object value)属性(値valueを持つattribute)を格納するeの子要素を返します。見つからない場合はnullを返します。StyleStyleSheet. getRule(HTML.Tag t, Element e)指定されたタイプのHTMLタグを描画するために使用するスタイルを取得します。voidHTMLDocument. insertAfterEnd(Element elem, String htmlText)指定された要素の最後の後に文字列として指定されたHTMLを挿入します。voidHTMLDocument. insertAfterStart(Element elem, String htmlText)要素の開始位置に文字列として指定されたHTMLを挿入します。protected voidHTMLEditorKit.InsertHTMLTextAction. insertAtBoundary(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag)境界に挿入するときに呼び出されます。protected voidHTMLEditorKit.InsertHTMLTextAction. insertAtBoundry(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag)非推奨。Java 2プラットフォームv1.3以降は、insertAtBoundaryを使用してください。voidHTMLDocument. insertBeforeEnd(Element elem, String htmlText)要素の終了位置に文字列として指定されたHTMLを挿入します。voidHTMLDocument. insertBeforeStart(Element elem, String htmlText)指定された要素が開始される前に文字列として指定されたHTMLを挿入します。protected booleanMinimalHTMLWriter. isText(Element elem)要素がテキストならtrueを返します。voidHTMLDocument. setInnerHTML(Element elem, String htmlText)指定された要素の子をHTML文字列として指定されたコンテンツと置き換えます。voidHTMLDocument. setOuterHTML(Element elem, String htmlText)指定された親の要素をHTML文字列として指定されたコンテンツと置き換えます。protected voidHTMLWriter. startTag(Element elem)要素の開始タグを書き出します。protected booleanHTMLWriter. synthesizedElement(Element elem)要素が合成要素の場合はtrueを返します。protected voidHTMLWriter. text(Element elem)テキストを書き出します。protected voidMinimalHTMLWriter. text(Element elem)テキストを書き出します。protected voidMinimalHTMLWriter. writeComponent(Element elem)コンポーネント要素の書出しを行います。意図的に実装しない場合があります。protected voidMinimalHTMLWriter. writeContent(Element elem, boolean needsIndenting)HTMLに準拠した方法で属性セットを書き出します。protected voidMinimalHTMLWriter. writeImage(Element elem)アイコン要素の書出しを行います。意図的に実装しない場合があります。protected voidMinimalHTMLWriter. writeLeaf(Element elem)テキスト以外の葉の要素の書出しを制御します。protected voidMinimalHTMLWriter. writeStartParagraph(Element elem)段落の開始タグを発行します。Element型のパラメータを持つjavax.swing.text.html内のコンストラクタ コンストラクタ 説明 BlockElement(Element parent, AttributeSet a)最初は子を含まない、複合要素を作成します。BlockView(Element elem, int axis)HTMLボックスを表す新しいビューを作成します。FormView(Element elem)新しいFormViewオブジェクトを作成します。HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String desc, Element sourceElement, InputEvent inputEvent, String targetFrame)ハイパーテキスト・リンク・イベントを表す新しいオブジェクトを作成します。HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String desc, Element sourceElement, String targetFrame)ハイパーテキスト・リンク・イベントを表す新しいオブジェクトを作成します。HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, Element sourceElement, String targetFrame)ハイパーテキスト・リンク・イベントを表す新しいオブジェクトを作成します。ImageView(Element elem)IMG要素を表す新しいビューを作成します。InlineView(Element elem)要素にラップされた新しいビューを作成します。ListView(Element elem)リスト要素を表す新しいビューを作成します。ObjectView(Element elem)新しいObjectViewオブジェクトを作成します。ParagraphView(Element elem)指定された要素のParagraphViewを構築します。RunElement(Element parent, AttributeSet a, int offs0, int offs1)ドキュメント内のコンテンツを表す(子を持たない)要素を作成します。