Class EventInMFNodeWrapper
java.lang.Object
vrml.eai.field.BaseField
vrml.eai.field.EventIn
vrml.eai.field.EventInMFNode
org.web3d.vrml.scripting.external.neteai.EventInMFNodeWrapper
- All Implemented Interfaces:
ExternalEvent
Client side implementation of EventInMFNode field.
EventIn objects double as buffers for data inbound to the event system.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionEventInMFNodeWrapper
(int fieldID, FieldAndNodeRequestProcessor requestProcessor, org.web3d.vrml.scripting.external.neteai.EAIFieldAndNodeFactory fieldFactory, NetworkEventQueue eventQueue) EventInMFNodeWrapper
(int fieldID, FieldAndNodeRequestProcessor requestProcessor, org.web3d.vrml.scripting.external.neteai.EAIFieldAndNodeFactory fieldFactory, NetworkEventQueue eventQueue, Node[] suppliedValue) -
Method Summary
Modifier and TypeMethodDescriptionvoid
doEvent()
The EventIn*Wrapper classes implement doEvent by posting their stored values to the underlying implementation.boolean
Two eventIn's are equal if they point to the same actual node and fieldint
The underlying field IDint
getType()
The type of the underlying field.Get the user data that is associated with this eventInint
hashCode()
In order to make the event queueing system easier, and since an equals method is required by the specification, compute the hashcode based on the field number and underlying node hashcode.boolean
Is the event conglomerating or non-conglomerating.void
loadFieldValue
(DataInputStream input) void
Set a particular node value in the given eventIn array.void
setUserData
(Object data) Associate user data with this event.void
Set the value of the array of nodes.void
writeFieldValue
(DataOutputStream output)
-
Constructor Details
-
EventInMFNodeWrapper
public EventInMFNodeWrapper(int fieldID, FieldAndNodeRequestProcessor requestProcessor, org.web3d.vrml.scripting.external.neteai.EAIFieldAndNodeFactory fieldFactory, NetworkEventQueue eventQueue) - Parameters:
fieldID
- The network field IDrequestProcessor
- Handler for field servicesfieldFactory
-eventQueue
- The queue to send events to
-
EventInMFNodeWrapper
public EventInMFNodeWrapper(int fieldID, FieldAndNodeRequestProcessor requestProcessor, org.web3d.vrml.scripting.external.neteai.EAIFieldAndNodeFactory fieldFactory, NetworkEventQueue eventQueue, Node[] suppliedValue) - Parameters:
fieldID
- The network field IDrequestProcessor
- Handler for field serviceseventQueue
- The queue to send events tosuppliedValue
-
-
-
Method Details
-
doEvent
public void doEvent()The EventIn*Wrapper classes implement doEvent by posting their stored values to the underlying implementation.- Specified by:
doEvent
in interfaceExternalEvent
- See Also:
-
equals
-
getFieldID
public int getFieldID()The underlying field ID- See Also:
-
hashCode
-
isConglomerating
public boolean isConglomerating()Description copied from interface:ExternalEvent
Is the event conglomerating or non-conglomerating. Conglomerating events such as the set1Value calls build up in the event buffer.- Specified by:
isConglomerating
in interfaceExternalEvent
- Returns:
- whether event is conglomerating or not
- See Also:
-
setValue
Description copied from class:EventInMFNode
Set the value of the array of nodes. Input is an array of valid Node references. If the length is zero or the node reference is null, then the actions to take are according to the class introduction above. If the array contains a null reference then th resulting event passed to the eventIn is implementation dependentIf any of the node references have had their dispose methods called, an InvalidNodeException will be generated and no event sent to the scene graph.
- Specified by:
setValue
in classEventInMFNode
- Parameters:
value
- The array of node references- See Also:
-
set1Value
Description copied from class:EventInMFNode
Set a particular node value in the given eventIn array. To the VRML world this will generate a full MFNode event with the nominated index value changed.If the index is out of the bounds of the current array of data values an ArrayIndexOutOfBoundsException will be generated. If the Node value is null the behaviour will be undefined as far as generating an event to the scene graph is concerned in order to be consistent with the behaviour described in the class introduction. This method call will not generate an exception if the node reference is null.
If the node reference passed to this method has already had the dispose method called then an InvalidNodeException will be generated.
- Specified by:
set1Value
in classEventInMFNode
- Parameters:
index
- The position to set the colour valuevalue
- The node reference- See Also:
-
setUserData
Description copied from class:EventIn
Associate user data with this event. Whenever an event is generated on this eventIn. this data will be available with the Event through its getData method.- Specified by:
setUserData
in classEventIn
- Parameters:
data
- The data to associate with this eventIn instance- See Also:
-
getUserData
Description copied from class:EventIn
Get the user data that is associated with this eventIn- Specified by:
getUserData
in classEventIn
- Returns:
- * @see vrml.eai.field.EventIn#getUserData()
-
loadFieldValue
- Throws:
IOException
- * @see org.web3d.vrml.scripting.external.neteai.EventWrapper#loadFieldValue(java.io.DataInputStream)
-
writeFieldValue
- Throws:
IOException
- * @see org.web3d.vrml.scripting.external.neteai.EventWrapper#writeFieldValue(java.io.DataOutputStream)
-
getType
int getType()The type of the underlying field. Method name chosen to coincide with vrml.eai.field.BaseField.- Returns:
- the type of the underlying field
-