org.iso.mpeg.mpegj.scene
Interface Node


public interface Node

An interface that acts as a proxy for a BIFS node in the scene graph. Only nodes in the scene that have been instanced with DEF may have a Node proxy.


Method Summary
 void addEventOutListener(int outID, EventOutListener l)
          Install a listener for an eventOut or exposedField in this node of the scene graph.
 FieldValue getEventOut(int outID)
          Reads the current value of an eventOut or exposedField in this node of the scene graph.
 int getNodeType()
          Obtain the node type of the node.
 void removeEventOutListener(int outID, EventOutListener l)
          Remove a listener previously added for an eventOut or exposedField in this node of the scene graph.
 void sendEventIn(int inID, FieldValue newValue)
          Updates the value of an eventIn or exposedField in this node of the scene graph.
 

Method Detail

sendEventIn

public void sendEventIn(int inID,
                        FieldValue newValue)
                 throws BadParameterException,
                        InvalidNodeException
Updates the value of an eventIn or exposedField in this node of the scene graph. This is a synchronous call that will not return until the field is updated in the scene.
Parameters:
inID - The inID of the field to be updated.
newValue - The desired new value for the field.
Throws:
BadParameterException - Thrown if the selected field ID is not valid for this node, or if the value is not an appropriate type for the field.
InvalidNodeException - Thrown if the node is no longer valid (due to removal or replacement).
See Also:
EventIn

getEventOut

public FieldValue getEventOut(int outID)
                       throws BadParameterException,
                              InvalidNodeException
Reads the current value of an eventOut or exposedField in this node of the scene graph.
Parameters:
outID - The outID of the field to be read.
Returns:
a FieldValue containing the value read from the desired field.
Throws:
BadParameterException - Thrown if the selected field ID is not valid for this node.
InvalidNodeException - Thrown if the node is no longer valid (due to removal or replacement).
See Also:
EventOut

addEventOutListener

public void addEventOutListener(int outID,
                                EventOutListener l)
                         throws BadParameterException,
                                InvalidNodeException
Install a listener for an eventOut or exposedField in this node of the scene graph.
Parameters:
outID - The outID of the field to be monitored.
listener - The listener to notify of changes.
Throws:
BadParameterException - Thrown if the selected field ID is not valid for this node.
InvalidNodeException - Thrown if the node is no longer valid (due to removal or replacement).
See Also:
EventOut, EventOutListener

removeEventOutListener

public void removeEventOutListener(int outID,
                                   EventOutListener l)
                            throws BadParameterException,
                                   InvalidNodeException
Remove a listener previously added for an eventOut or exposedField in this node of the scene graph.
Parameters:
outID - The outID of the field no longer to be monitored.
listener - The listener that is to be removed.
Throws:
BadParameterException - Thrown if the selected field ID is not valid for this node.
InvalidNodeException - Thrown if the node is no longer valid (due to removal or replacement).
See Also:
EventOut, EventOutListener

getNodeType

public int getNodeType()
                throws InvalidNodeException
Obtain the node type of the node.
Returns:
an int indicating the node type.
Throws:
InvalidNodeException - Thrown if the node is no longer valid.
See Also:
NodeType