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 classCommandQueueEvent.TypeAn enumeration for the types supported by theCommandQueueEventclass.
-
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 ofCommandQueueEventand fully initializes it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandgetCommand()Returns theCommandobject affected by this event.CommandQueuegetCommandQueue()Returns theCommandQueuethat caused this event.CommandQueueEvent.TypegetType()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 ofCommandQueueEventand fully initializes it.- Parameters:
q- the affected command queuec- the affected command objectt- the event's type
-
-
Method Detail
-
getCommand
public Command getCommand()
Returns theCommandobject affected by this event. This may be null if this event is not related to aCommandobject.- Returns:
- the affected command
-
getCommandQueue
public CommandQueue getCommandQueue()
Returns theCommandQueuethat caused this event.- Returns:
- the command queue
-
getType
public CommandQueueEvent.Type getType()
Returns the type of this event. This is one of theQE_XXXXconstants.- Returns:
- the type of this event
-
-