Package net.sf.jguiraffe.gui.cmd
Enum CommandQueueEvent.Type
- java.lang.Object
-
- java.lang.Enum<CommandQueueEvent.Type>
-
- net.sf.jguiraffe.gui.cmd.CommandQueueEvent.Type
-
- All Implemented Interfaces:
Serializable
,Comparable<CommandQueueEvent.Type>
- Enclosing class:
- CommandQueueEvent
public static enum CommandQueueEvent.Type extends Enum<CommandQueueEvent.Type>
An enumeration for the types supported by the
CommandQueueEvent
class.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMMAND_ADDED
A command was added to the queue.COMMAND_EXECUTED
Execution of a command is finished.COMMAND_EXECUTING
A command is about to be executed.QUEUE_BUSY
A command was added to an empty queue.QUEUE_IDLE
The last command contained in the queue was processed.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CommandQueueEvent.Type
valueOf(String name)
Returns the enum constant of this type with the specified name.static CommandQueueEvent.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
COMMAND_ADDED
public static final CommandQueueEvent.Type COMMAND_ADDED
A command was added to the queue. Events of this type are generated by theexecute()
method for each passed inCommand
object.
-
COMMAND_EXECUTING
public static final CommandQueueEvent.Type COMMAND_EXECUTING
A command is about to be executed. This event is triggered if a worker thread fetches a command object and starts with its execution.
-
COMMAND_EXECUTED
public static final CommandQueueEvent.Type COMMAND_EXECUTED
Execution of a command is finished. This event is triggered after a worker thread has executed a command.
-
QUEUE_BUSY
public static final CommandQueueEvent.Type QUEUE_BUSY
A command was added to an empty queue. This event is triggered if the queue has been idle and then the processing of commands starts. After all pending commands have been executed an event of typeQUEUE_IDLE
is triggered. As long as the queue is in the BUSY state, theisPending()
method returns true.
-
QUEUE_IDLE
public static final CommandQueueEvent.Type QUEUE_IDLE
The last command contained in the queue was processed. This is the opposite event ofQUEUE_BUSY
. It indicates that all pending commands have been processed, and the queue is now empty.
-
-
Method Detail
-
values
public static CommandQueueEvent.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CommandQueueEvent.Type c : CommandQueueEvent.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CommandQueueEvent.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-