Xj3D VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLSurfaceLayoutNodeType

All Superinterfaces:
FrameStateListener, VRMLNode, VRMLNodeType, VRMLSurfaceChildNodeType

public interface VRMLSurfaceLayoutNodeType
extends VRMLSurfaceChildNodeType

A grouping node that collects together and provides layout information for items on a surface.

When the instance is given nodes to manage, it should manage it until told not to. Any time that the window size changes, the relationship should recalculate the on-screen position and notify the overlay items of their new pixel coordinates.

It is legal for a layout node to also contain other layout nodes in a nested fashion. An implementation should be aware of this and make sure it handles nested layouts correctly.

Version:
$Revision: 1.1 $
Author:
Justin Couch

Method Summary
 VRMLNodeType[] getChildren()
          Get the list of current children used by this node.
 void setChildren(VRMLNodeType[] kids)
          Set the drawable content of this node to the surface.
 void windowChanged(int x, int y, int width, int height)
          Set the new window size, requesting that the layout implementation rebuild and re-evalutate all of the items it contains.
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLSurfaceChildNodeType
getBboxSize, getParentVisible, getRealBounds, isVisible, setLayoutListener, setLocation, setParentVisible, setVisible
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType
addNodeListener, getFieldValue, getMetadataObject, getRefCount, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setupFinished, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
 
Methods inherited from interface org.web3d.vrml.lang.VRMLNode
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion
 
Methods inherited from interface org.web3d.vrml.nodes.FrameStateListener
allEventsComplete
 

Method Detail

windowChanged

public void windowChanged(int x,
                          int y,
                          int width,
                          int height)
Set the new window size, requesting that the layout implementation rebuild and re-evalutate all of the items it contains. If this layout is a child of another layout, the size set will be the allocated size for the child window. The location is in standard 2D screen coordinates of the top-left corner.

Parameters:
x - The x location of the window in pixels
y - The y location of the window in pixels
width - The width of the window in pixels
height - The height of the window in pixels

setChildren

public void setChildren(VRMLNodeType[] kids)
                 throws InvalidFieldValueException
Set the drawable content of this node to the surface. If value is set to null, then it clears all the renderable list and nothing is show. The nodes provided must be VRMLSurfaceChildNodeType or VRMLProtoInstance.

Parameters:
kids - The list of new nodes to layout
Throws:
InvalidFieldValueException - The nodes are not one of the required types.

getChildren

public VRMLNodeType[] getChildren()
Get the list of current children used by this node. If none are defined, this returns a null value. be VRMLSurfaceChildNodeType or VRMLProtoInstance.

Returns:
The list of current managed nodes or null

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium