org.kde.koala
Class KCommand

java.lang.Object
  extended by org.kde.koala.KCommand
All Implemented Interfaces:
org.kde.qt.QtSupport
Direct Known Subclasses:
KNamedCommand

public class KCommand
extends java.lang.Object
implements org.kde.qt.QtSupport

The abstract base class for all Commands. Commands are used to store information needed for Undo/Redo functionality...


Constructor Summary
protected KCommand(java.lang.Class dummy)
           
 
Method Summary
 void execute()
          The main method: executes this command.
 java.lang.String name()
           
 void unexecute()
          Unexecutes (undo) this command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KCommand

protected KCommand(java.lang.Class dummy)
Method Detail

execute

public void execute()
The main method: executes this command. Implement here what this command is about, and remember to record any information that will be helpful for #unexecute.


unexecute

public void unexecute()
Unexecutes (undo) this command. Implement here the steps to take for undoing the command. If your application uses actions for everything (it should), and if you implement unexecute correctly, the application is in the same state after unexecute as it was before execute. This means, the next call to execute will do the same thing as it did the first time.


name

public java.lang.String name()
Returns:
the name of this command, translated, since it will appear in the menus.