Xj3D VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLKeyDeviceSensorNodeType

All Superinterfaces:
java.util.EventListener, FrameStateListener, java.awt.event.KeyListener, VRMLChildNodeType, VRMLNode, VRMLNodeType, VRMLSensorNodeType

public interface VRMLKeyDeviceSensorNodeType
extends VRMLSensorNodeType, java.awt.event.KeyListener

A sensor that takes it's input from a keyboard device.

These sensors handle an active status that determines when they should receive key information from the user interface.

As it is always within a Java environment, we can get key events from the AWT system. We provide methods here to map the current key events to the those provided by the AWT system. As a convenience measure we make the interface extend KeyListener even though the implementation may wish to provide another way of sending events. These methods in the listener are what we need to pass in key information anyway.

Version:
$Revision: 1.7 $
Author:
Justin Couch

Method Summary
 boolean requiresLastEventOnly()
          See if this key device sensor requires only the last key sent or all of them.
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLSensorNodeType
getEnabled, getIsActive, setEnabled
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType
addNodeListener, getFieldValue, getMetadataObject, getRefCount, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setupFinished, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
 
Methods inherited from interface org.web3d.vrml.lang.VRMLNode
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion
 
Methods inherited from interface org.web3d.vrml.nodes.FrameStateListener
allEventsComplete
 
Methods inherited from interface java.awt.event.KeyListener
keyPressed, keyReleased, keyTyped
 

Method Detail

requiresLastEventOnly

public boolean requiresLastEventOnly()
See if this key device sensor requires only the last key sent or all of them. This is used to determine what is sent to the implementation. For example, a StringSensor would want all the keys, but the KeySensor only wants the last one.

Returns:
true if this only requires the last key event

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium