Package com.sun.j3d.utils.behaviors.keyboard

# Class KeyNavigator

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

public class KeyNavigator extends 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

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

## Method Summary

Modifier and Type
Method
Description
`void`
`integrateTransformChanges()`
Computes a new transform for the next frame based on the current transform, accumulated keyboard inputs, and elapsed time.
`void`
`processKeyEvent(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 Details

### 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 Details

### 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(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