org.kde.koala
Class KMacroCommand

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

public class KMacroCommand
extends KNamedCommand

A Macro Command is a command that holds several sub-commands. It will appear as one to the user and in the command history, but it can use the implementation of multiple commands internally.


Constructor Summary
protected KMacroCommand(java.lang.Class dummy)
           
  KMacroCommand(java.lang.String name)
          Creates a macro command.
 
Method Summary
 void addCommand(KCommand command)
          Appends a command to this macro command.
 void dispose()
          Delete the wrapped C++ instance ahead of finalize()
 void execute()
          Executes this command, i.e.
protected  void finalize()
          Deletes the wrapped C++ instance
 boolean isDisposed()
          Has the wrapped C++ instance been deleted?
 void unexecute()
          Undoes the execution of this command, i.e.
 
Methods inherited from class org.kde.koala.KNamedCommand
name, setName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KMacroCommand

protected KMacroCommand(java.lang.Class dummy)

KMacroCommand

public KMacroCommand(java.lang.String name)
Creates a macro command. You will then need to call addCommand for each subcommand to be added to this macro command.

Parameters:
name - the name of this command, translated, since it will appear in the menus.
Method Detail

addCommand

public void addCommand(KCommand command)
Appends a command to this macro command. The ownership is transfered to the macro command.


execute

public void execute()
Executes this command, i.e. execute all the sub-commands in the order in which they were added.

Overrides:
execute in class KCommand

unexecute

public void unexecute()
Undoes the execution of this command, i.e. #unexecute all the sub-commands in the _reverse_ order to the one in which they were added.

Overrides:
unexecute in class KCommand

finalize

protected void finalize()
                 throws java.lang.InternalError
Deletes the wrapped C++ instance

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.InternalError

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()


isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?