/* * @(#)Command.java 5.2 * */ package CH.ifa.draw.util; import CH.ifa.draw.framework.DrawingView; /** * Commands encapsulate an action to be executed. Commands have * a name and can be used in conjunction with Command enabled * ui components. *
* Design Patterns

*  o * Command
* Command is a simple instance of the command pattern without undo * support. *


* * @see CommandButton * @see CommandMenu * @see CommandChoice */ public interface Command { /** * Executes the command. */ public void execute(); /** * Tests if the command can be executed. */ public boolean isExecutable(); /** * Gets the command name. */ public String name(); public DrawingView view(); }