java.lang.Object
javax.swing.AbstractAction
javax.swing.text.TextAction
javax.swing.text.StyledEditorKit.StyledTextAction
javax.swing.text.StyledEditorKit.FontFamilyAction
- 所有实现的接口:
-
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
-
FontFamilyAction
创建一个新的FontFamilyAction。- 参数:
-
nm
- 操作名称 -
family
- 字体系列
-
-
Method Details
-
actionPerformed
设置字体系列。- 参数:
-
e
- 事件
-