- java.lang.Object
- 
- javax.swing.AbstractAction
- 
- javax.swing.text.TextAction
- 
- javax.swing.text.StyledEditorKit.StyledTextAction
 
 
 
- 
- すべての実装されたインタフェース:
- ActionListener,- Serializable,- Cloneable,- EventListener,- Action
 - 直系の既知のサブクラス:
- HTMLEditorKit.HTMLTextAction,- StyledEditorKit.AlignmentAction,- StyledEditorKit.BoldAction,- StyledEditorKit.FontFamilyAction,- StyledEditorKit.FontSizeAction,- StyledEditorKit.ForegroundAction,- StyledEditorKit.ItalicAction,- StyledEditorKit.UnderlineAction
 - 含まれているクラス:
- StyledEditorKit
 
 public abstract static class StyledEditorKit.StyledTextAction extends TextAction StyledEditorKit (またはサブクラス)がインストールされたJEditorPaneでトリガーされると見なされるアクションです。 このアクションは、文字や段落のレベル属性を変更する簡易メソッドです。 StyledDocument、JEditorPane、またはStyledEditorKitがtrueにならなかったと見なされる場合は、この簡易メソッドによってIllegalArgumentExceptionがスローされます。ソースがJEditorPane型にナロー変換される場合、このアクションの影響を受けるコンポーネントはActionEventのソースになります。 ソースがナロー変換できない場合は、最後にフォーカスのあったテキスト・コンポーネントが変更されます。 どちらでもない場合、アクションは実行されません。 警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースとの互換性がなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4以降、すべてのJavaBeans™用の長期間の格納サポートが java.beansパッケージに追加されています。XMLEncoderを参照してください。- 関連項目:
- 直列化された形式
 
- 
- 
フィールドのサマリー- 
クラス javax.swing.AbstractActionで宣言されたフィールドchangeSupport, enabled
 - 
インタフェース javax.swing.Actionで宣言されたフィールドACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
- 
 - 
コンストラクタのサマリーコンストラクタ コンストラクタ 説明 StyledTextAction(String nm)文字列であるアクション名から、新しいStyledTextActionを作成します。
 - 
メソッドのサマリーすべてのメソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 protected JEditorPanegetEditor(ActionEvent e)アクションのターゲット・エディタを取得します。protected StyledDocumentgetStyledDocument(JEditorPane e)このエディタ・ペインに関連したドキュメントを取得します。protected StyledEditorKitgetStyledEditorKit(JEditorPane e)このエディタ・ペインに関連したエディタ・キットを取得します。protected voidsetCharacterAttributes(JEditorPane editor, AttributeSet attr, boolean replace)指定された属性を文字コンテンツに適用します。protected voidsetParagraphAttributes(JEditorPane editor, AttributeSet attr, boolean replace)指定された属性を段落に適用します。- 
クラス javax.swing.text.TextActionで宣言されたメソッドaugmentList, getFocusedComponent, getTextComponent
 - 
クラス javax.swing.AbstractActionで宣言されたメソッドaddPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 - 
クラス java.lang.Objectで宣言されたメソッドequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
インタフェース java.awt.event.ActionListenerで宣言されたメソッドactionPerformed
 
- 
 
- 
- 
- 
コンストラクタの詳細- 
StyledTextActionpublic StyledTextAction(String nm) 文字列であるアクション名から、新しいStyledTextActionを作成します。- パラメータ:
- nm- アクションの名前
 
 
- 
 - 
メソッドの詳細- 
getEditorprotected final JEditorPane getEditor(ActionEvent e) アクションのターゲット・エディタを取得します。- パラメータ:
- e- アクション・イベント
- 戻り値:
- エディタ
 
 - 
getStyledDocumentprotected final StyledDocument getStyledDocument(JEditorPane e) このエディタ・ペインに関連したドキュメントを取得します。- パラメータ:
- e- エディタ
- 戻り値:
- ドキュメント
- 例外:
- IllegalArgumentException- 不正なドキュメント型の場合
 
 - 
getStyledEditorKitprotected final StyledEditorKit getStyledEditorKit(JEditorPane e) このエディタ・ペインに関連したエディタ・キットを取得します。- パラメータ:
- e- エディタ・ペイン
- 戻り値:
- キット
- 例外:
- IllegalArgumentException- 不正なドキュメント型の場合
 
 - 
setCharacterAttributesprotected final void setCharacterAttributes(JEditorPane editor, AttributeSet attr, boolean replace) 指定された属性を文字コンテンツに適用します。 選択がある場合、属性はその選択範囲に適用されます。 選択がない場合、属性は、挿入される新しいテキストの属性を定義する入力属性セットに適用されます。- パラメータ:
- editor- エディタ
- attr- 属性
- replace- trueの場合、既存の属性が最初に置き換えられる
 
 - 
setParagraphAttributesprotected final void setParagraphAttributes(JEditorPane editor, AttributeSet attr, boolean replace) 指定された属性を段落に適用します。 選択がある場合、属性はその選択と交わる段落に適用されます。選択がない場合、属性は現在のキャレット位置にある段落に適用されます。- パラメータ:
- editor- エディタ
- attr- 属性
- replace- trueの場合、既存の属性が最初に置き換えられる
 
 
- 
 
-