java.lang.Object
javax.swing.text.EditorKit
javax.swing.text.DefaultEditorKit
javax.swing.text.StyledEditorKit
- すべての実装されたインタフェース:
- Serializable,- Cloneable
- 直系の既知のサブクラス:
- HTMLEditorKit,- RTFEditorKit
public class StyledEditorKit extends DefaultEditorKit
特定のタイプのテキスト・ドキュメントに対して適切なエディタとして機能するために、テキスト・コンポーネントに必要なセットです。 この実装は、テキストを書式付きテキストとして処理し、書式付きテキストを編集するためのアクションの最小セットを提供するデフォルトの実装を提供します。 
- 
ネストされたクラスのサマリーネストされたクラス 修飾子と型 クラス 説明 static classStyledEditorKit.AlignmentAction段落の配置方法を設定するアクションです。static classStyledEditorKit.BoldAction太字属性を切り替えるアクションです。static classStyledEditorKit.FontFamilyAction関連するJEditorPaneのフォント・ファミリを設定するアクションです。static classStyledEditorKit.FontSizeAction関連するJEditorPaneのフォント・サイズを設定するアクションです。static classStyledEditorKit.ForegroundActionフォアグラウンド・カラーを設定するアクションです。static classStyledEditorKit.ItalicActionイタリック属性を切り替えるアクションです。static classStyledEditorKit.StyledTextActionインストールされたStyledEditorKit (またはサブクラス)によってJEditorPaneでトリガーされると見なされるアクションです。static classStyledEditorKit.UnderlineAction下線属性を切り替えるアクションです。クラス javax.swing.text.DefaultEditorKitで宣言されたネストされたクラス/インタフェースDefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction
- 
フィールドのサマリークラス javax.swing.text.DefaultEditorKitで宣言されたフィールドbackwardAction, beepAction, beginAction, beginLineAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deleteNextWordAction, deletePrevCharAction, deletePrevWordAction, downAction, endAction, endLineAction, EndOfLineStringProperty, endParagraphAction, endWordAction, forwardAction, insertBreakAction, insertContentAction, insertTabAction, nextWordAction, pageDownAction, pageUpAction, pasteAction, previousWordAction, readOnlyAction, selectAllAction, selectionBackwardAction, selectionBeginAction, selectionBeginLineAction, selectionBeginParagraphAction, selectionBeginWordAction, selectionDownAction, selectionEndAction, selectionEndLineAction, selectionEndParagraphAction, selectionEndWordAction, selectionForwardAction, selectionNextWordAction, selectionPreviousWordAction, selectionUpAction, selectLineAction, selectParagraphAction, selectWordAction, upAction, writableAction
- 
コンストラクタのサマリーコンストラクタ コンストラクタ 説明 StyledEditorKit()書式付きドキュメントで使用する新しいEditorKitを作成します。
- 
メソッドのサマリー修飾子と型 メソッド 説明 Objectclone()編集キットのコピーを作成します。DocumentcreateDefaultDocument()この型のエディタに適している未初期化テキスト・ストレージ・モデルを作成します。protected voidcreateInputAttributes(Element element, MutableAttributeSet set)elementのAttributeSet内のキーと値のペアをsetにコピーします。voiddeinstall(JEditorPane c)キットがJEditorPaneから削除されているときに呼び出されます。Action[]getActions()エディタのコマンド・リストを取得します。ElementgetCharacterAttributeRun()キャレットに対応する現在の文字属性を表す要素を取得します。MutableAttributeSetgetInputAttributes()ペインの入力属性を返します。ViewFactorygetViewFactory()このキットが作成した任意のモデルのビューを作成するのに適したファクトリを取得します。voidinstall(JEditorPane c)キットがJEditorPaneにインストールされているときに呼び出されます。クラス javax.swing.text.DefaultEditorKitで宣言されたメソッドcreateCaret, getContentType, read, read, write, write
- 
コンストラクタの詳細- 
StyledEditorKitpublic StyledEditorKit()書式付きドキュメントで使用する新しいEditorKitを作成します。
 
- 
- 
メソッドの詳細- 
getInputAttributespublic MutableAttributeSet getInputAttributes()ペインの入力属性を返します。 キャレットが移動し、選択がない場合、入力属性は現在のキャレット位置の文字属性を反映するために自動的に変更されます。 書式付き編集アクションは、入力属性を使用してアクションを実行します。- 戻り値:
- 属性セット
 
- 
getCharacterAttributeRunpublic Element getCharacterAttributeRun()キャレットに対応する現在の文字属性を表す要素を取得します。- 戻り値:
- 要素
 
- 
getActionspublic Action[] getActions()エディタのコマンド・リストを取得します。 これは、書式処理のためにローカルで定義されたコマンドのコレクションによって追加されたスーパー・クラスによってサポートされるコマンドのリストです。- オーバーライド:
- getActions、クラス:- DefaultEditorKit
- 戻り値:
- コマンド・リスト
 
- 
createDefaultDocumentpublic Document createDefaultDocument()この型のエディタに適している未初期化テキスト・ストレージ・モデルを作成します。- オーバーライド:
- createDefaultDocument、クラス:- DefaultEditorKit
- 戻り値:
- モデル
 
- 
installpublic void install(JEditorPane c)キットがJEditorPaneにインストールされているときに呼び出されます。
- 
deinstallpublic void deinstall(JEditorPane c)キットがJEditorPaneから削除されているときに呼び出されます。 このメソッドは、追加されたリスナーの登録を解除するために使用されます。
- 
getViewFactorypublic ViewFactory getViewFactory()このキットが作成した任意のモデルのビューを作成するのに適したファクトリを取得します。 これは、次のタイプの要素についてViewの実装を返すために実装されます。- AbstractDocument.ContentElementName
- AbstractDocument.ParagraphElementName
- AbstractDocument.SectionElementName
- StyleConstants.ComponentElementName
- StyleConstants.IconElementName
 - オーバーライド:
- getViewFactory、クラス:- DefaultEditorKit
- 戻り値:
- ファクトリ
 
- 
clonepublic Object clone()編集キットのコピーを作成します。
- 
createInputAttributesprotected void createInputAttributes(Element element, MutableAttributeSet set)elementのAttributeSet内のキーと値のペアをsetにコピーします。 このメソッドは、コンポーネント、アイコン、要素名の各属性はコピーしません。 サブクラスでは、どの属性をコピーしてどの属性をコピーしないかを変更することもできます。 ただし、最初にset内のすべての属性を必ず削除してください。このメソッドは、キャレットが別の位置に移動するたびに呼び出されます。 - パラメータ:
- element- 要素
- set- 属性
 
 
-