Class EventOutMFNodeWrapper
java.lang.Object
vrml.eai.field.BaseField
vrml.eai.field.EventOut
vrml.eai.field.EventOutMField
vrml.eai.field.EventOutMFNode
org.web3d.vrml.scripting.external.neteai.EventOutMFNodeWrapper
Client side implementation of EventOutMFNodeWrapper field.
EventOut fields which are used by the vrmlEventChanged
broadcast system report only their stored value.
EventOut fields produced by Node.getEventOut report only
the 'live' value of the field.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionEventOutMFNodeWrapper
(int fieldID, FieldAndNodeRequestProcessor requestProcessor, org.web3d.vrml.scripting.external.neteai.EAIFieldAndNodeFactory factory) EventOutMFNodeWrapper
(int fieldID, FieldAndNodeRequestProcessor requestProcessor, org.web3d.vrml.scripting.external.neteai.EAIFieldAndNodeFactory factory, DataInputStream source) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a listener for changes in this eventOut.boolean
Two fields are equal if they point to the same actual node and fieldget1Value
(int index) Get a particular node value in the given eventOut array.int
The underlying field IDint
getType()
The type of the underlying field.Get the user data that is associated with this eventOutNode[]
getValue()
Get the value of the array of nodes.void
Write the value of the array of the nodes to the given array.int
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.void
loadFieldValue
(DataInputStream input) void
Remove a listener for changes in this eventOut.void
setUserData
(Object data) Associate user data with this event.int
size()
Get the size of the underlying data array.void
writeFieldValue
(DataOutputStream output)
-
Constructor Details
-
EventOutMFNodeWrapper
public EventOutMFNodeWrapper(int fieldID, FieldAndNodeRequestProcessor requestProcessor, org.web3d.vrml.scripting.external.neteai.EAIFieldAndNodeFactory factory) - Parameters:
fieldID
- The network field IDrequestProcessor
- Handler for field servicesfactory
-
-
EventOutMFNodeWrapper
public EventOutMFNodeWrapper(int fieldID, FieldAndNodeRequestProcessor requestProcessor, org.web3d.vrml.scripting.external.neteai.EAIFieldAndNodeFactory factory, DataInputStream source) throws IOException - Parameters:
fieldID
- The network field IDrequestProcessor
- Handler for field servicesfactory
-source
- The stream to read field values from- Throws:
IOException
-
-
Method Details
-
equals
-
getFieldID
public int getFieldID()The underlying field ID- See Also:
-
getValue
Description copied from class:EventOutMFNode
Get the value of the array of nodes.- Specified by:
getValue
in classEventOutMFNode
- Returns:
- * @see vrml.eai.field.EventOutMFNode#getValue()
-
getValue
Description copied from class:EventOutMFNode
Write the value of the array of the nodes to the given array. Individual elements in the array may be null depending on the implementation of the browser and whether it maintains null references.- Specified by:
getValue
in classEventOutMFNode
- Parameters:
nodes
- The node array to be filled in- See Also:
-
get1Value
Description copied from class:EventOutMFNode
Get a particular node value in the given eventOut array.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 because the browser implementation keeps null references then this method will return a null pointer without throwing any exception.
- Specified by:
get1Value
in classEventOutMFNode
- Parameters:
index
- The position to read the values from- Returns:
- * @see vrml.eai.field.EventOutMFNode#get1Value(int)
-
hashCode
-
size
public int size()Description copied from class:EventOutMField
Get the size of the underlying data array.- Specified by:
size
in classEventOutMField
- Returns:
- * @see vrml.eai.field.EventOutMField#size()
-
addVrmlEventListener
Description copied from class:EventOut
Add a listener for changes in this eventOut.- Specified by:
addVrmlEventListener
in classEventOut
- Parameters:
l
- The listener to add- See Also:
-
removeVrmlEventListener
Description copied from class:EventOut
Remove a listener for changes in this eventOut.- Specified by:
removeVrmlEventListener
in classEventOut
- Parameters:
l
- The listener to remove- See Also:
-
setUserData
Description copied from class:EventOut
Associate user data with this event. Whenever an event is generated on this eventOut. this data will be available with the Event through its getData method.- Specified by:
setUserData
in classEventOut
- Parameters:
data
- The data to associate with this eventOut instance- See Also:
-
getUserData
Description copied from class:EventOut
Get the user data that is associated with this eventOut- Specified by:
getUserData
in classEventOut
- Returns:
- * @see vrml.eai.field.EventOut#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
-