it.amattioli.applicate.commands.executors
Class UndoAvailableCommand

Show UML class diagram
java.lang.Object
  extended by it.amattioli.applicate.commands.AbstractCommand
      extended by it.amattioli.applicate.commands.executors.UndoAvailableCommand
All Implemented Interfaces:
Command, ExecutorAwareCommand, ValuesLister, it.amattioli.dominate.util.PropertyChangeEmitter

public class UndoAvailableCommand
extends AbstractCommand
implements ExecutorAwareCommand

Check if there is something to undo. Send this command to an UndoableExecutor to check if the executor has at least one command that can be undone. After executing the command the client can check the result with checkResult().

Author:
andrea

Constructor Summary
UndoAvailableCommand()
           
 
Method Summary
 boolean checkResult()
           
 void doCommand()
          Check if the executor has at least one command that can be undone.
 void setCommandExecutor(CommandExecutor executor)
           
 
Methods inherited from class it.amattioli.applicate.commands.AbstractCommand
addCommandListener, addCommandListener, addPropertyChangeListener, cancelCommand, firePropertyChange, getPropertyValues, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.amattioli.applicate.commands.Command
addCommandListener, addCommandListener, cancelCommand
 
Methods inherited from interface it.amattioli.dominate.util.PropertyChangeEmitter
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

UndoAvailableCommand

public UndoAvailableCommand()
Method Detail

setCommandExecutor

public void setCommandExecutor(CommandExecutor executor)
Specified by:
setCommandExecutor in interface ExecutorAwareCommand

doCommand

public void doCommand()
               throws ApplicationException
Check if the executor has at least one command that can be undone.

Specified by:
doCommand in interface Command
Overrides:
doCommand in class AbstractCommand
Throws:
IllegalStateException - if the executor is not an UndoableExecutor
ApplicationException

checkResult

public boolean checkResult()


Copyright © 2011. All Rights Reserved.