|
qflib 0.98.0 | ||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
CommandHandler | This is the interface through wich Commands
that do not implement the Invokable interface
get executed.
|
Invokable | Commands that implement this interface will be invoked
directly by the CommandDistributor . |
Class Summary | |
AsyncCommand | This extension of the Command class is used as a marker for the CommandDistributor.assignAsyncCommand method. |
Command | Commands are similar to the events of a GUI, but operate at a higher level of abstraction. |
CommandDistributor | This class is responsible for the distribution of high level commands among possible command handlers. |
Exception Summary | |
CancelCommandException | A special exception to signal that a Command has been
aborted by the user. |
CommandException | This is the base class for exceptions thrown during the execution
of Commands . |
DialogCommandException | When a DialogCommandException is thrown during the exection of a Command that has been assigned through a CommandDistributor , it will be caught and the Dialog contained in it will
be displayed. |
MessageCommandException | When a MessageCommandException is thrown during the exection of a Command that has been assigned through a CommandDistributor , it will be caught and a Dialog for the contained
message will be displayed through Message.showMessage . |
RuntimeCommandException | A RuntimeCommandException is useful to pass RuntimeExceptions that were expected and can be handled up to the CommandDistributor, without having to declare it. |
UnhandledCommandException | This exception is thrown by CommandDistributor.assignCommandSilently , when a Command
has been passed through all possible CommandHandlers
and is still not handled. |
The classes in this package implement a command dispatch mechanism at a higher level of abstraction than the standard AWT event loop.
Dispatching Commands
through the
CommandDistributor
is
useful because it enables exception handling through a single point of
entry. It also decouples GUI components and the actions they cause,
providing communication across library boundaries if necessary.
There are two very different kinds of Command concepts. In one concept
the Command is viewed as being solely responsible for its own
execution. The creator of the Command has to provide it with all
necessary information, the rest must be available through some static
interface. This kind of Command is created through implementing the
Invokable
interface.
The other type of Command represents an event or a container of information, where the CommandDistributor acts as a mediator between creators and handlers of Commands. In that way, creators and handlers of Commands can be developed independently, they only have to agree upon a format for the Commands being used.
|
qflib 0.98.0 | ||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |