com.croftsoft.apps.tag3d
Class Tag3DKeyListener
java.lang.Object
com.croftsoft.apps.tag3d.Tag3DKeyListener
- All Implemented Interfaces:
- KeyListener, EventListener
public class Tag3DKeyListener
- extends Object
- implements KeyListener
Handles keyboard events from the Canvas3D.
- Version:
- 1999-02-07
- Author:
- David W. Croft
Constructor Summary |
Tag3DKeyListener(double deltaRotation,
double deltaTranslation,
String id,
StateMulticaster stateMulticaster,
javax.media.j3d.TransformGroup viewTransformGroup)
How keyboard input view effects and where the updates are broadcast. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
deltaRotation
protected double deltaRotation
deltaTranslation
protected double deltaTranslation
id
protected String id
stateMulticaster
protected StateMulticaster stateMulticaster
viewTransformGroup
protected javax.media.j3d.TransformGroup viewTransformGroup
Tag3DKeyListener
public Tag3DKeyListener(double deltaRotation,
double deltaTranslation,
String id,
StateMulticaster stateMulticaster,
javax.media.j3d.TransformGroup viewTransformGroup)
- How keyboard input view effects and where the updates are broadcast.
- Parameters:
deltaRotation
- The number of radians to rotate the view upon a keyboard input.deltaTranslation
- The distance to translate the view upon a keyboard input.id
- The unique identifier for the object controlled by the keyboard.stateMulticaster
- Destination for Transform3DState updates for this view.viewTransformGroup
- Contains the current view transform for the object controlled.
keyPressed
public void keyPressed(KeyEvent keyEvent)
- Interprets view transform inputs and broadcasts the updates.
- Specified by:
keyPressed
in interface KeyListener
- Parameters:
keyEvent
- Arrow keys in combination with no other key, the Shift key, or
the Alt key will rotate or translate the transform about the
relative X, Y, and Z axes respectively for 6 degrees of freedom.
keyReleased
public void keyReleased(KeyEvent keyEvent)
- Specified by:
keyReleased
in interface KeyListener
keyTyped
public void keyTyped(KeyEvent keyEvent)
- Specified by:
keyTyped
in interface KeyListener
CroftSoft Apps Javadoc (2008-09-28 21:15:07)