java.lang.Object
javax.swing.AbstractAction
javax.swing.text.TextAction
javax.swing.text.StyledEditorKit.StyledTextAction
javax.swing.text.StyledEditorKit.AlignmentAction
- 所有已实现的接口:
ActionListener,Serializable,Cloneable,EventListener,Action
- 封闭类:
StyledEditorKit
设置段落对齐的操作。这会为目标 JEditorPane 的当前选定范围设置
StyleConstants.Alignment 属性。这是通过在与目标 JEditorPane 关联的样式化文档上调用 StyledDocument.setParagraphAttributes 来完成的。
如果目标文本组件被指定为 ActionEvent 的源并且有一个命令字符串,则该命令字符串将被解释为一个整数,该整数应该是 StyleConstants.Alignment 属性的合法值之一。
Warning: 此类的序列化对象将与未来的 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 -
构造方法总结
构造方法 -
方法总结
在类 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
-
构造方法详细信息
-
AlignmentAction
创建一个新的 AlignmentAction。- 参数:
nm- 动作名称a- 对齐 >= 0
-
-
方法详情
-
actionPerformed
设置对齐方式。- 参数:
e- 动作事件
-