GF4J 0.9.4 Beta

gameframe.engines.jdk12x
Class CInputEngine

java.lang.Object
  |
  +--java.awt.EventQueue
        |
        +--gameframe.engines.jdk12x.CInputEngine
All Implemented Interfaces:
Finalizable, InputEngine

public class CInputEngine
extends java.awt.EventQueue
implements InputEngine, Finalizable

Implementation of the input engine for Java 2 JVM's.

Since:
GameFrame for Java 0.9
Version:
GameFrame for Java 0.9.3

Field Summary
private  java.awt.Component m_focusComponent
          The focus component that is listened for events.
private static CInputEngine mStatic_inputEngine
          The singleton instance of the input engine.
 
Fields inherited from class java.awt.EventQueue
dbg, debug, dispatchThread, HIGH_PRIORITY, LOW_PRIORITY, nextQueue, NORM_PRIORITY, NUM_PRIORITIES, previousQueue, queues, threadInitNumber
 
Constructor Summary
CInputEngine(java.awt.Component focusComponent, GameFrameSettings settings)
          Constructs an input engine.
 
Method Summary
 void finalize()
          Releases all resources held by the all input device implementations.
 KeyboardDevice[] getAllKeyboardDevices()
          Returns all keyboard type of devices found on the system.
 PointerDevice[] getAllPointerDevices()
          Returns all pointer type of devices found on the system.
 KeyboardDevice getDefaultKeyboardDevice()
          Returns the default keyboard type of device in the system.
 PointerDevice getDefaultPointerDevice()
          Returns the default pointer type of device in the system.
 java.lang.String getDescription()
          Returns the (possibly multiline) description of the implementation.
 java.lang.String getName()
          Returns the short name (max 8 characters) of the implementation "Java2".
 
Methods inherited from class java.awt.EventQueue
, changeKeyEventFocus, dispatchEvent, getDispatchThread, getNextEvent, invokeAndWait, invokeLater, isDispatchThread, nextThreadNum, noEvents, peekEvent, peekEvent, pop, postEvent, postEvent, postEventPrivate, push, removeSourceEvents
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

mStatic_inputEngine

private static CInputEngine mStatic_inputEngine
The singleton instance of the input engine.

m_focusComponent

private java.awt.Component m_focusComponent
The focus component that is listened for events.
Constructor Detail

CInputEngine

public CInputEngine(java.awt.Component focusComponent,
                    GameFrameSettings settings)
             throws GameFrameException
Constructs an input engine.
Parameters:
focusComponent - Component that is listened for events.
settings - The settings object that contains settings for this input engine.
Method Detail

getDefaultKeyboardDevice

public KeyboardDevice getDefaultKeyboardDevice()
                                        throws GameFrameException
Returns the default keyboard type of device in the system.
Specified by:
getDefaultKeyboardDevice in interface InputEngine
Returns:
The default keyboard
See Also:
KeyboardDevice

getAllKeyboardDevices

public KeyboardDevice[] getAllKeyboardDevices()
                                       throws GameFrameException
Returns all keyboard type of devices found on the system.
Specified by:
getAllKeyboardDevices in interface InputEngine
Returns:
All keyboard type of devices found on the system.
See Also:
KeyboardDevice

getDefaultPointerDevice

public PointerDevice getDefaultPointerDevice()
                                      throws GameFrameException
Returns the default pointer type of device in the system.
Specified by:
getDefaultPointerDevice in interface InputEngine
Returns:
The default pointer device.
See Also:
PointerDevice

getAllPointerDevices

public PointerDevice[] getAllPointerDevices()
                                     throws GameFrameException
Returns all pointer type of devices found on the system.
Specified by:
getAllPointerDevices in interface InputEngine
Returns:
All pointer type of devices.
See Also:
PointerDevice

getName

public java.lang.String getName()
Returns the short name (max 8 characters) of the implementation "Java2".
Specified by:
getName in interface InputEngine
Returns:
The short name of the graphics engine.
Since:
GameFrame for Java 0.9.3

getDescription

public java.lang.String getDescription()
Returns the (possibly multiline) description of the implementation.
Specified by:
getDescription in interface InputEngine
Returns:
A description of the graphics engine.
Since:
GameFrame for Java 0.9.3

finalize

public void finalize()
Releases all resources held by the all input device implementations.
Specified by:
finalize in interface Finalizable
Overrides:
finalize in class java.lang.Object

GF4J 0.9.4 Beta