Aviatrix3D
2.2.0

org.j3d.renderer.aviatrix3d.device.input.keyboard
Class KeyboardDevice

java.lang.Object
  extended by org.j3d.renderer.aviatrix3d.device.input.keyboard.KeyboardDevice
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener, ControllerDevice, InputDevice, TrackerDevice

public class KeyboardDevice
extends java.lang.Object
implements TrackerDevice, java.awt.event.KeyListener

A keyboard device. This device is a navigation only device.

Version:
$Revision: 1.1 $
Author:
Alan Hudson

Field Summary
 
Fields inherited from interface org.j3d.device.input.InputDevice
FUNC_BUTTON_1, FUNC_BUTTON_2, FUNC_BUTTON_3, FUNC_BUTTON_4, FUNC_L1_BUTTON, FUNC_LEFT_HAT, FUNC_LEFT_STICK_X, FUNC_LEFT_STICK_Y, FUNC_LEFT_STICK_Z, FUNC_NAV_X, FUNC_NAV_Y, FUNC_NAV_Y_CENTERED, FUNC_NONE, FUNC_ORIENT_X, FUNC_ORIENT_Y, FUNC_R1_BUTTON, FUNC_RIGHT_STICK_X, FUNC_RIGHT_STICK_Y, FUNC_START_BUTTON, FUNC_THROTTLE, FUNC_VIEWPOINT_NEXT, FUNC_WHEEL_X
 
Constructor Summary
KeyboardDevice(java.lang.String name)
          Construct a new keyboard device with the given name.
 
Method Summary
 java.lang.String getName()
          Get the name of this device.
 int getTrackerCount()
          Get a count of the number of trackers this device has.
 Tracker[] getTrackers()
           
 void keyPressed(java.awt.event.KeyEvent evt)
          Notification of a key press event.
 void keyReleased(java.awt.event.KeyEvent evt)
          Notification of a key release event.
 void keyTyped(java.awt.event.KeyEvent evt)
          Notification of a key type (press and release) event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyboardDevice

public KeyboardDevice(java.lang.String name)
Construct a new keyboard device with the given name.

Parameters:
name - The name string to associate with this device
Method Detail

getName

public java.lang.String getName()
Get the name of this device. Names are of the form class-#. Valid classes are Gamepad, Joystick, Wheel, Midi, GenericHID.

Specified by:
getName in interface InputDevice
Returns:
The name

getTrackers

public Tracker[] getTrackers()
Specified by:
getTrackers in interface TrackerDevice

getTrackerCount

public int getTrackerCount()
Get a count of the number of trackers this device has. This cannot change during the life of a device.

Specified by:
getTrackerCount in interface TrackerDevice

keyPressed

public void keyPressed(java.awt.event.KeyEvent evt)
Notification of a key press event. This will any one of the key value fields depending on the value.

Specified by:
keyPressed in interface java.awt.event.KeyListener
Parameters:
evt - The key event that caused this method to be called

keyReleased

public void keyReleased(java.awt.event.KeyEvent evt)
Notification of a key release event. This will any one of the key value fields depending on the value.

Specified by:
keyReleased in interface java.awt.event.KeyListener
Parameters:
evt - The key event that caused this method to be called

keyTyped

public void keyTyped(java.awt.event.KeyEvent evt)
Notification of a key type (press and release) event. This will any one of the key value fields depending on the value.

Specified by:
keyTyped in interface java.awt.event.KeyListener
Parameters:
evt - The key event that caused this method to be called

Aviatrix3D
2.2.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org