JavaTM 2
Platform
Std. Ed. v1.4.0

javax.swing.text
クラス StyledEditorKit.AlignmentAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.StyledEditorKit.StyledTextAction
                    |
                    +--javax.swing.text.StyledEditorKit.AlignmentAction
すべての実装インタフェース:
Action, ActionListener, Cloneable, EventListener, Serializable
含まれているクラス:
StyledEditorKit

public static class StyledEditorKit.AlignmentAction
extends StyledEditorKit.StyledTextAction

段落の配置方法を設定するアクションです。これによって、ターゲット JEditorPane の現在選択されている範囲における StyleConstants.Alignment 属性が設定されます。この処理は、ターゲット JEditorPane に関連付けられた書式付きドキュメント上で StyledDocument.setParagraphAttributes を呼び出すことで実行されます。

ターゲットのテキスト コンポーネントが ActionEvent のソースとして指定され、またコマンド文字列が存在する場合、そのコマンド文字列は StyleConstants.Alignment 属性の適正な値である整数値として解釈されます。

警告: このクラスの直列化されたオブジェクトは、今後の Swing のリリースとは互換性を持ちません。現在の直列化サポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。1.4 では、すべての JavaBeansTM の長期運用サポートが、 java.beans パッケージに追加されました。XMLEncoder を参照してください。


フィールドの概要
 
クラス javax.swing.AbstractAction から継承したフィールド
changeSupport, enabled
 
インタフェース javax.swing.Action から継承したフィールド
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
コンストラクタの概要
StyledEditorKit.AlignmentAction(String nm, int a)
          新しい AlignmentAction を作成します。
 
メソッドの概要
 void actionPerformed(ActionEvent e)
          配置方法を設定します。
 
クラス javax.swing.text.StyledEditorKit.StyledTextAction から継承したメソッド
getEditor, getStyledDocument, getStyledEditorKit, setCharacterAttributes, setParagraphAttributes
 
クラス 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
 

コンストラクタの詳細

StyledEditorKit.AlignmentAction

public StyledEditorKit.AlignmentAction(String nm,
                                       int a)
新しい AlignmentAction を作成します。

パラメータ:
nm - アクション名
a - 配置方法 >= 0
メソッドの詳細

actionPerformed

public void actionPerformed(ActionEvent e)
配置方法を設定します。

パラメータ:
e - アクションイベント

JavaTM 2
Platform
Std. Ed. v1.4.0

バグの報告と機能のリクエスト
これ以外の API リファレンスおよび開発者用ドキュメントについては、 Java 2 SDK SE 開発者用ドキュメントを参照してください。 開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、 およびコード実例が含まれています。

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