|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.web3d.vrml.scripting.external.buffer.BaseExternalEventAdapter
BaseExternalEventAdapter Base outgoing event adapter which attempts to abstract the common logic between the SAI and EAI notification system.
| Field Summary | |
protected java.util.LinkedList[] |
buffers
The queue of eventOut buffers for each field with a listener. |
protected VRMLNodeType |
parentNode
The VRMLNodeType from the underlying implementation that we broadcast for. |
protected VRMLClock |
timeClock
The clock for producing consistent timestamps |
| Constructor Summary | |
BaseExternalEventAdapter(VRMLNodeType aNode,
VRMLClock clock)
Construct the basic event adapter. |
|
| Method Summary | |
void |
addListener(int fieldID,
java.lang.Object who)
Add a listener for one of the fields of this node. |
void |
fieldChanged(int fieldID)
Generate the event notification for a field of one of VRMLNodeType node this object is registered with. |
abstract void |
generateBroadcast(int fieldID,
double timestamp)
Broadcast an eventOutChanged event for a given field Modifications to the buffers arrays are synchronized so this needs to be too for safety. |
protected java.util.Vector |
getListeners(int fieldID)
Get the listeners for a given fieldID. |
void |
removeListener(int fieldID,
java.lang.Object who)
Remove a listener for one of the fields of this node. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected VRMLNodeType parentNode
protected java.util.LinkedList[] buffers
protected VRMLClock timeClock
| Constructor Detail |
public BaseExternalEventAdapter(VRMLNodeType aNode,
VRMLClock clock)
aNode - The underlying node that we are adapting for.clock - The clock to use for timestamps.| Method Detail |
public void addListener(int fieldID,
java.lang.Object who)
addListener in interface ExternalEventAdapterfieldID - The ID of the field.who - The listener to add.public void fieldChanged(int fieldID)
fieldID - The ID of the field which changed.
public abstract void generateBroadcast(int fieldID,
double timestamp)
generateBroadcast in interface ExternalEventAdapterfieldID - The fieldID which changedtimestamp - The timestamp to useprotected java.util.Vector getListeners(int fieldID)
fieldID - The ID of the field.
public void removeListener(int fieldID,
java.lang.Object who)
removeListener in interface ExternalEventAdapterfieldID - The ID of the field.who - The listener to remove.
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||