|
qflib 0.99 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
de.qfs.lib.command.Command
Commands are similar to the events of a GUI, but operate at a higher level
of abstraction. They can be created anywhere and passed to a
CommandDistributor
that will either execute
them directly or pass them on to suitable
CommandHandlers
.
Field Summary |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary | |
Command(java.lang.Object source)
Create a new Command object. |
Method Summary | |
boolean |
isHandled()
Query whether the Command was already handled. |
boolean |
mustBeHandled()
Test whether the Command must be handled. |
void |
setHandled(boolean handled)
Set the handled state of the Command. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Command(java.lang.Object source)
source
- The source from which the Command originated.Method Detail |
public final boolean isHandled()
public final void setHandled(boolean handled)
handled
- The handled state to set.public boolean mustBeHandled()
CommandDistributor
will throw an UnhandledCommandException
in assignCommandSilently
if it
cannot find a handler for the command. The default is to always return true, but you can override this method in a derived class to signal otherwise, which is useful for message type commands with possibly multiple receivers.
|
qflib 0.99 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |