JHotDraw 6.0b1

org.jhotdraw.util
Class UndoableCommand

java.lang.Object
  extended by org.jhotdraw.util.UndoableCommand
All Implemented Interfaces:
FigureSelectionListener, Command, CommandListener

public class UndoableCommand
extends java.lang.Object
implements Command, FigureSelectionListener, CommandListener


Constructor Summary
UndoableCommand(Command newWrappedCommand)
           
 
Method Summary
 void addCommandListener(CommandListener newCommandListener)
           
 void commandExecutable(java.util.EventObject commandEvent)
           
 void commandExecuted(java.util.EventObject commandEvent)
           
 void commandNotExecutable(java.util.EventObject commandEvent)
           
 AbstractCommand.EventDispatcher createEventDispatcher()
           
 void execute()
          Executes the command.
 void figureSelectionChanged(DrawingView view)
          Sent when the figure selection has changed.
 DrawingEditor getDrawingEditor()
           
protected  AbstractCommand.EventDispatcher getEventDispatcher()
           
 Undoable getUndoActivity()
           
protected  Command getWrappedCommand()
           
 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)
           
protected  void setWrappedCommand(Command newWrappedCommand)
           
 DrawingView view()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UndoableCommand

public UndoableCommand(Command newWrappedCommand)
Method Detail

execute

public void execute()
Executes the command.

Specified by:
execute in interface Command

isExecutable

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

Specified by:
isExecutable in interface Command

setWrappedCommand

protected void setWrappedCommand(Command newWrappedCommand)

getWrappedCommand

protected Command getWrappedCommand()

name

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

Specified by:
name in interface Command

getDrawingEditor

public DrawingEditor getDrawingEditor()
Specified by:
getDrawingEditor in interface Command

view

public DrawingView view()

figureSelectionChanged

public void figureSelectionChanged(DrawingView view)
Description copied from interface: FigureSelectionListener
Sent when the figure selection has changed.

Specified by:
figureSelectionChanged in interface FigureSelectionListener
Parameters:
view - DrawingView

getUndoActivity

public Undoable getUndoActivity()
Specified by:
getUndoActivity in interface Command

setUndoActivity

public void setUndoActivity(Undoable newUndoableActivity)
Specified by:
setUndoActivity in interface Command

addCommandListener

public void addCommandListener(CommandListener newCommandListener)
Specified by:
addCommandListener in interface Command

removeCommandListener

public void removeCommandListener(CommandListener oldCommandListener)
Specified by:
removeCommandListener in interface Command

getEventDispatcher

protected AbstractCommand.EventDispatcher getEventDispatcher()

createEventDispatcher

public AbstractCommand.EventDispatcher createEventDispatcher()

commandExecuted

public void commandExecuted(java.util.EventObject commandEvent)
Specified by:
commandExecuted in interface CommandListener

commandExecutable

public void commandExecutable(java.util.EventObject commandEvent)
Specified by:
commandExecutable in interface CommandListener

commandNotExecutable

public void commandNotExecutable(java.util.EventObject commandEvent)
Specified by:
commandNotExecutable in interface CommandListener

JHotDraw 6.0b1