vrml.eai.field
Class EventInSFNode
java.lang.Object
vrml.eai.field.BaseField
vrml.eai.field.EventIn
vrml.eai.field.EventInSFNode
public abstract class EventInSFNode
- extends EventIn
Reference to a SFNode event-in slot. Use this class to write
values into SFNode event-in slots.
The following example demonstrates how to create
a box geometry and put it into a shape node:
vrml.eai.Node shapeNode = ...;
vrml.eai.Node boxNode = browser.createVrmlFromString("Box {}")[0];
vrml.eai.field.EventInSFNode set_geometry = (vrml.eai.field.EventInSFNode)shapeNode.getEventIn("set_geometry");
set_geometry.setValue(boxNode);
Fields inherited from class vrml.eai.field.BaseField |
MFColor, MFFloat, MFInt32, MFNode, MFRotation, MFString, MFTime, MFVec2f, MFVec3f, SFBool, SFColor, SFFloat, SFImage, SFInt32, SFNode, SFRotation, SFString, SFTime, SFVec2f, SFVec3f |
Constructor Summary |
protected |
EventInSFNode()
Default constructor. |
Method Summary |
abstract void |
setValue(Node value)
Sets the new value of a SFNode event-in slot. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventInSFNode
protected EventInSFNode()
- Default constructor. This method is protected, i.e. you cannot create
new instances of this class. The only way to get instances is via the
Node.getEventIn(java.lang.String)
method.
setValue
public abstract void setValue(Node value)
throws InvalidNodeException
- Sets the new value of a SFNode event-in slot.
The following example demonstrates how to create
a box geometry and put it into a shape node:
vrml.eai.Node shapeNode = ...;
vrml.eai.Node boxNode = browser.createVrmlFromString("Box {}")[0];
vrml.eai.field.EventInSFNode set_geometry = (vrml.eai.field.EventInSFNode)shapeNode.getEventIn("set_geometry");
set_geometry.setValue(boxNode);
- Parameters:
value
- The new node. Use null
to remove
a node from a field.
- Throws:
InvalidNodeException
- when the value parameter contains
an invalid node.