Package net.sf.jguiraffe.gui.cmd
Class CommandQueueEvent
- java.lang.Object
-
- java.util.EventObject
-
- net.sf.jguiraffe.gui.cmd.CommandQueueEvent
-
- All Implemented Interfaces:
Serializable
public class CommandQueueEvent extends EventObject
An event class for notifying listeners about the state of a
CommandQueue
.Event objects of this class are sent to registered listeners if certain changes in the command queue's life cycle occur. Registered listeners can react on these changes, i.g. by displaying some signs if currently commands are executed.
- Version:
- $Id: CommandQueueEvent.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CommandQueueEvent.Type
An enumeration for the types supported by theCommandQueueEvent
class.
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description CommandQueueEvent(CommandQueue q, Command c, CommandQueueEvent.Type t)
Creates a new instance ofCommandQueueEvent
and fully initializes it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Command
getCommand()
Returns theCommand
object affected by this event.CommandQueue
getCommandQueue()
Returns theCommandQueue
that caused this event.CommandQueueEvent.Type
getType()
Returns the type of this event.-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
CommandQueueEvent
public CommandQueueEvent(CommandQueue q, Command c, CommandQueueEvent.Type t)
Creates a new instance ofCommandQueueEvent
and fully initializes it.- Parameters:
q
- the affected command queuec
- the affected command objectt
- the event's type
-
-
Method Detail
-
getCommand
public Command getCommand()
Returns theCommand
object affected by this event. This may be null if this event is not related to aCommand
object.- Returns:
- the affected command
-
getCommandQueue
public CommandQueue getCommandQueue()
Returns theCommandQueue
that caused this event.- Returns:
- the command queue
-
getType
public CommandQueueEvent.Type getType()
Returns the type of this event. This is one of theQE_XXXX
constants.- Returns:
- the type of this event
-
-