openfileaction.java

来自「自己用Java写的一个mp3文件改名的小工具」· Java 代码 · 共 54 行

JAVA
54
字号
import javax.swing.Action;

/**
 *  Represents the Import Action.
 *
 * @author     kilo
 * @created    2003年12月22日
 */
public final class OpenFileAction
		 extends mp3AbstractAction {

	/**
	 *  Description of the Field
	 */
	private final static String ACTION_COMMAND_KEY_ABOUT = "open-command";
	/**
	 *  Description of the Field
	 */
	private final static String NAME_ABOUT = "打开文件或目录";
	/**
	 *  Description of the Field
	 */
	private final static String SMALL_ICON_ABOUT = "open.png";

	/**
	 *  Description of the Field
	 */
	private final static String SHORT_DESCRIPTION_ABOUT = "打开目录或者mp3文件";
	/**
	 *  Description of the Field
	 */
	private final static String LONG_DESCRIPTION_ABOUT =
			"Open file or directory from local disk";
	/**
	 *  Description of the Field
	 */
	private final static int MNEMONIC_KEY_ABOUT = 'O';


	/**
	 *  Constructor for the OpenFileAction object
	 */
	public OpenFileAction() {
		putValue( Action.NAME, NAME_ABOUT );
		putValue( Action.SMALL_ICON, getIcon( SMALL_ICON_ABOUT ) );
		putValue( Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION_ABOUT );
		putValue( Action.LONG_DESCRIPTION, LONG_DESCRIPTION_ABOUT );
		putValue( Action.MNEMONIC_KEY, new Integer( MNEMONIC_KEY_ABOUT ) );
		putValue( Action.ACTION_COMMAND_KEY, ACTION_COMMAND_KEY_ABOUT );
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?