⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 command.java

📁 JHotDraw学习过程中对数组的测试程序haha 学习过程中对数组的测试程序
💻 JAVA
字号:
/* * @(#)Command.java 5.1 * */package CH.ifa.draw.util;import java.awt.*;import java.util.*;/** * Commands encapsulate an action to be executed. Commands have * a name and can be used in conjunction with <i>Command enabled</i> * ui components. * <hr> * <b>Design Patterns</b><P> * <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> * <b><a href=../pattlets/sld010.htm>Command</a></b><br> * Command is a simple instance of the command pattern without undo * support. * <hr> * * @see CommandButton * @see CommandMenu * @see CommandChoice */public abstract class Command {    private String  fName;    /**     * Constructs a command with the given name.     */    public Command(String name) {        fName = name;    }    /**     * Executes the command.     */    public abstract void execute();    /**     * Tests if the command can be executed.     */    public boolean isExecutable() {        return true;    }    /**     * Gets the command name.     */    public String name() {        return fName;    }}

⌨️ 快捷键说明

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