org.minueto
Class MinuetoEventQueue

java.lang.Object
  extended by org.minueto.MinuetoEventQueue

public class MinuetoEventQueue
extends java.lang.Object

The MinuetoEventQueue to stores Minueto related events such as keyboard input, mouse input and window event. Events can be processed by registering the proper event handler and calling the handle method.

Since:
Minueto 0.3
See Also:
MinuetoKeyboardHandler, MinuetoMouseHandler, MinuetoWindowHandler

Constructor Summary
MinuetoEventQueue()
          Create an empty event queue.
 
Method Summary
 void add(MinuetoEvent event)
          Add an event to the event queue.
 void handle()
          Handle the next event using the appropriate handler.
 boolean hasNext()
          Return true if the queue holds another event.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinuetoEventQueue

public MinuetoEventQueue()
Create an empty event queue.

Method Detail

add

public void add(MinuetoEvent event)
Add an event to the event queue. This method should only be called by events inside the Minueto package.

Parameters:
event - MinuetoEvent to be added to the queue.

hasNext

public boolean hasNext()
Return true if the queue holds another event.

Returns:
boolean value indicating if the queue is not empty.

handle

public void handle()
Handle the next event using the appropriate handler.

Throws:
MinuetoEventQueueEmptyException - if the event queue is empty.