JHotDraw 6.0b1

org.jhotdraw.util
Interface Command

All Known Implementing Classes:
AbstractCommand, AlignCommand, BringToFrontCommand, ChangeAttributeCommand, CopyCommand, CutCommand, DeleteCommand, DuplicateCommand, FigureTransferCommand, GroupCommand, InsertImageCommand, PasteCommand, RedoCommand, SelectAllCommand, SendToBackCommand, ToggleGridCommand, UndoableCommand, UndoCommand, UngroupCommand, ZoomCommand

public interface Command

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 Also:
CommandButton, CommandMenu, CommandChoice

Method Summary
 void addCommandListener(CommandListener newCommandListener)
           
 void execute()
          Executes the command.
 DrawingEditor getDrawingEditor()
           
 Undoable getUndoActivity()
           
 boolean isExecutable()
          Tests if the command can be executed.
 java.lang.String name()
          Gets the command name.
 void removeCommandListener(CommandListener oldCommandListener)
           
 void setUndoActivity(Undoable newUndoableActivity)
           
 

Method Detail

execute

void execute()
Executes the command.


isExecutable

boolean isExecutable()
Tests if the command can be executed.


name

java.lang.String name()
Gets the command name.


getDrawingEditor

DrawingEditor getDrawingEditor()

getUndoActivity

Undoable getUndoActivity()

setUndoActivity

void setUndoActivity(Undoable newUndoableActivity)

addCommandListener

void addCommandListener(CommandListener newCommandListener)

removeCommandListener

void removeCommandListener(CommandListener oldCommandListener)

JHotDraw 6.0b1