java.lang.Object
javax.swing.AbstractAction
javax.swing.text.TextAction
javax.swing.text.StyledEditorKit.StyledTextAction
javax.swing.text.StyledEditorKit.FontSizeAction
- 所有实现的接口:
-
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
- 封装类:
-
StyledEditorKit
用于在关联的JEditorPane中设置字体大小的操作。如果在ActionEvent上有指定的大小作为命令字符串,则将使用该大小,否则将使用初始化的大小。
警告: 该类的序列化对象将不兼容未来的Swing版本。当前的序列化支持适用于短期存储或在运行相同Swing版本的应用程序之间的RMI。从1.4版本开始,已将所有JavaBeans的长期存储支持添加到java.beans
包中。请参阅XMLEncoder
。
-
Field Summary
Fields declared in class javax.swing.AbstractAction
changeSupport, enabled
Fields declared in interface 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
-
Constructor Summary
-
Method Summary
Methods declared in class javax.swing.text.StyledEditorKit.StyledTextAction
getEditor, getStyledDocument, getStyledEditorKit, setCharacterAttributes, setParagraphAttributes
Methods declared in class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods declared in class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Constructor Details
-
FontSizeAction
创建一个新的FontSizeAction。- 参数:
-
nm
- 操作名称 -
size
- 字体大小
-
-
Method Details
-
actionPerformed
设置字体大小。- 参数:
-
e
- 操作事件
-