Package org.web3d.x3d.sai
Interface X3DField
- All Known Subinterfaces:
MFBool
,MFColor
,MFColorRGBA
,MFDouble
,MFFloat
,MField
,MFImage
,MFInt32
,MFNode
,MFRotation
,MFString
,MFTime
,MFVec2d
,MFVec2f
,MFVec3d
,MFVec3f
,SFBool
,SFColor
,SFColorRGBA
,SFDouble
,SFFloat
,SFImage
,SFInt32
,SFMatrix4f
,SFNode
,SFRotation
,SFString
,SFTime
,SFVec2d
,SFVec2f
,SFVec3d
,SFVec3f
public interface X3DField
Base representation of an X3D field type.
- Version:
- $Revision: 1.3 $
- Author:
- Justin Couch
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a listener for changes in this field.Get the definition of this field.Get the user data that is associated with this field.boolean
Check to see if this field is readable.boolean
Check to see if this field is writable.void
Remove a listener for changes in the readable field.void
setUserData
(Object data) Associate user data with this field.
-
Method Details
-
getDefinition
X3DFieldDefinition getDefinition()Get the definition of this field.- Returns:
- The field definition to use
-
isReadable
boolean isReadable()Check to see if this field is readable. This may return two different sets of values depending on the use. If this field is the field of a script that has been passed to a script implementation, it will return true if the field is an eventIn, exposedField or field and false for an eventOut. If it is a field of any other circumstance (i.e. an external application querying a node or a script querying another node it has a reference to) it shall return true for eventOuts, exposedFields and false for eventIn or field.- Returns:
- true if the values of this field are readable
-
isWritable
boolean isWritable()Check to see if this field is writable. This may return two different sets of values depending on the use. If this field is the field of a script that has been passed to a script implementation, it will return true if the field is an eventOut, exposedField or field and false for an eventIn. If it is a field of any other circumstance (i.e. an external application querying a node or a script querying another node it has a reference to) it shall return true for eventIns, exposedFields and false for eventOut or field.- Returns:
- true if the values of this field are readable
-
addX3DEventListener
Add a listener for changes in this field. This works for listening to changes in a readable field. A future extension to the specification, or a browser-specific extension, may allow for listeners to be added to writable nodes as well.A listener instance cannot have multiple simultaneous registrations. If the listener instance is currently registered, this request shall be silently ignored.
- Parameters:
l
- The listener to add
-
removeX3DEventListener
Remove a listener for changes in the readable field. If the listener is not currently registered, this request shall be silently ignored.- Parameters:
l
- The listener to remove
-
setUserData
Associate user data with this field. Whenever an field is generated on this field, this data will be available with the Event through its getData method.- Parameters:
data
- The data to associate with this eventOut instance
-
getUserData
Object getUserData()Get the user data that is associated with this field.- Returns:
- The user data, if any, associated with this field
-