Class EventInMFTimeWrapper
java.lang.Object
vrml.eai.field.BaseField
vrml.eai.field.EventIn
vrml.eai.field.EventInMFTime
org.web3d.vrml.scripting.external.neteai.EventInMFTimeWrapper
- All Implemented Interfaces:
ExternalEvent
Client side implementation of EventInMFTime field.
EventIn objects double as buffers for data inbound to the event system.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionEventInMFTimeWrapper(int fieldID, FieldAndNodeRequestProcessor requestProcessor, NetworkEventQueue eventQueue) EventInMFTimeWrapper(int fieldID, FieldAndNodeRequestProcessor requestProcessor, NetworkEventQueue eventQueue, double[] suppliedValue) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoEvent()The EventIn*Wrapper classes implement doEvent by posting their stored values to the underlying implementation.booleanTwo eventIn's are equal if they point to the same actual node and fieldintThe underlying field IDintgetType()The type of the underlying field.Get the user data that is associated with this eventIninthashCode()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.booleanIs the event conglomerating or non-conglomerating.voidloadFieldValue(DataInputStream input) voidset1Value(int index, double value) Set a particular time value in the given eventIn array.voidsetUserData(Object data) Associate user data with this event.voidsetValue(double[] value) Set the value of the array of times.voidwriteFieldValue(DataOutputStream output)
-
Constructor Details
-
EventInMFTimeWrapper
public EventInMFTimeWrapper(int fieldID, FieldAndNodeRequestProcessor requestProcessor, NetworkEventQueue eventQueue) - Parameters:
fieldID- The network field IDrequestProcessor- Handler for field serviceseventQueue- The queue to send events to
-
EventInMFTimeWrapper
public EventInMFTimeWrapper(int fieldID, FieldAndNodeRequestProcessor requestProcessor, NetworkEventQueue eventQueue, double[] 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:
doEventin interfaceExternalEvent- See Also:
-
equals
-
getFieldID
public int getFieldID()The underlying field ID- See Also:
-
hashCode
-
isConglomerating
public boolean isConglomerating()Description copied from interface:ExternalEventIs the event conglomerating or non-conglomerating. Conglomerating events such as the set1Value calls build up in the event buffer.- Specified by:
isConglomeratingin interfaceExternalEvent- Returns:
- whether event is conglomerating or not
- See Also:
-
setValue
public void setValue(double[] value) Description copied from class:EventInMFTimeSet the value of the array of times. Time values are not required to conform to any range checks.- Specified by:
setValuein classEventInMFTime- Parameters:
value- The array of time values- See Also:
-
set1Value
Description copied from class:EventInMFTimeSet a particular time value in the given eventIn array. To the VRML world this will generate a full MFTime 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.
- Specified by:
set1Valuein classEventInMFTime- Parameters:
index- The position to set the time valuevalue- The time value to set.- Throws:
ArrayIndexOutOfBoundsException- The index was outside of the bounds of the current array.- See Also:
-
setUserData
Description copied from class:EventInAssociate 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:
setUserDatain classEventIn- Parameters:
data- The data to associate with this eventIn instance- See Also:
-
getUserData
Description copied from class:EventInGet the user data that is associated with this eventIn- Specified by:
getUserDatain 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
-