📄 baseaction.java
字号:
/* * @(#) BaseAction.java * Copyright 2004 HWStudio. All rights reserved. */package hws.item.smart.action;//导入核心Java类库import javax.swing.KeyStroke;import javax.swing.AbstractAction;/** * 所有命令的超类 * * @version 0.1 2005-08-07 * @author Hwerz */public abstract class BaseAction extends AbstractAction { /*------------------------------------------------------------------------* * 属性定义 * *------------------------------------------------------------------------*/ /** * 状态栏提示信息 */ private String hintInfo; /*------------------------------------------------------------------------* * 构造函数 * *------------------------------------------------------------------------*/ /** * Create a new instance of this class * * @param name Action的名称 */ public BaseAction(String name) { super(name); hintInfo = " "; } /** * Create a new instance of this class * * @param name Action的名称 * @param mnemonic Action的快捷键 */ public BaseAction(String name, Integer mnemonic) { this(name); putValue(MNEMONIC_KEY, mnemonic); } /** * Create a new instance of this class * * @param name Action的名称 * @param key Action的加速键 */ public BaseAction(String name, KeyStroke key) { this(name); putValue(ACCELERATOR_KEY, key); } /** * Create a new instance of this class * * @param name Action的名称 * @param mnemonic Action的快捷键 * @param key Action的加速键 */ public BaseAction(String name, Integer mnemonic, KeyStroke key) { this(name); putValue(MNEMONIC_KEY, mnemonic); putValue(ACCELERATOR_KEY, key); } /*------------------------------------------------------------------------* * 公共方法 * *------------------------------------------------------------------------*/ /** * 返回状态栏提示信息 * * @return 状态栏提示信息 */ public String getHintInfo() { return hintInfo; } /** * 设置状态栏提示信息 * * @param hintInfo 状态栏提示信息 */ public void setHintInfo(String hintInfo) { this.hintInfo = hintInfo; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -