Package net.sf.jguiraffe.gui.cmd


package net.sf.jguiraffe.gui.cmd

This package contains the implementation of the Command pattern.

The actions provided by an application can be implemented as Command objects. Such an object has a well-defined interface (namely the Command interface) and will be run in a separate thread. This is important for the application to stay responsive even when it executes complex tasks.

The CommandQueue interface allows executing command objects: just pass an object implementing the Command interface to its execute() method. It will then be executed by a working thread (as soon as one becomes available). The Command interface provides some methods that define a kind of life-cycle for a command object. In addition to the main execute() method that contains the main logic of the command methods for error handling are available. There is also support for updating the GUI after the execution of the command. Special care has to be taken about this topic because GUI updates must be performed by the event dispatch thread only.

Interested components can register itself as CommandQueueListeners at a command queue object. They will then receive notifications when commands are executed or the status of the queue changes.

$Id: package.html 205 2012-01-29 18:29:57Z oheger $

  • Klasse
    Beschreibung
    Definition of an interface for command objects.
    An abstract base class for implementations of the Command interface.
    Definition of an interface that describes a command queue.
    An event class for notifying listeners about the state of a CommandQueue.
    An enumeration for the types supported by the CommandQueueEvent class.
    A command queue implementation for GUI applications.
    Definition of an interface for listeners that want to be notified about changes in the state of a CommandQueue object.
    A wrapper implementation of the Command interface.
    Definition of an interface to be implemented by Command objects that are interested in the point of time they are passed to a CommandQueue .