## com.sun.j3d.utils.behaviors.keyboard
Class KeyNavigator

    java.lang.Object
      com.sun.j3d.utils.behaviors.keyboard.KeyNavigator

    public class KeyNavigator

extends java.lang.Object

This is the KeyNavigator class. It accumulates AWT key events (key press and key release) and computes a new transform based on the accumulated events and elapsed time.

Constructor Summary
`KeyNavigator(TransformGroup targetTG)` Constructs a new key navigator object that operates on the specified transform group.

Method Summary
`void` `integrateTransformChanges()` Computes a new transform for the next frame based on the current transform, accumulated keyboard inputs, and elapsed time.
`void` `processKeyEvent(java.awt.event.KeyEvent keyEvent)` Processed a keyboard event.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### KeyNavigator

    public KeyNavigator(TransformGroup targetTG)

  Constructs a new key navigator object that operates on the specified transform group. All parameters are set to their default, idle state.

  Parameters:
    `targetTG` - the target transform group

Method Detail

### integrateTransformChanges

    public void integrateTransformChanges()

  Computes a new transform for the next frame based on the current transform, accumulated keyboard inputs, and elapsed time. This new transform is written into the target transform group. This method should be called once per frame.

### processKeyEvent

    public void processKeyEvent(java.awt.event.KeyEvent keyEvent)

  Processed a keyboard event. This routine should be called every time a KEY_PRESSED or KEY_RELEASED event is received.

  Parameters:
    `keyEvent` - the AWT key event

Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.