Xj3D 2.0 VRML/X3D Code API

org.xj3d.sai
Interface Xj3DNavigationUIListener


public interface Xj3DNavigationUIListener

Listener for navigation user interface state change feedback from the internals of the browser.

These callback methods provide information for changes within an existing scene. For bulk changes, such as the change of scene, please use the base browser listener interface from the SAI.

Version:
$Revision: 1.3 $
Author:
Justin Couch

Method Summary
 void availableNavigationStatesChanged(java.lang.String[] states)
          The list of available navigation states has changed to this new list.
 void availableViewpointsChanged(Xj3DViewpoint[] viewpoints)
          The list of active viewpoints have been changed to this new list.
 void selectedNavigationStateChanged(java.lang.String state)
          Notification that the currently selected navigation state has changed to this new value.
 void selectedViewpointChanged(Xj3DViewpoint vp)
          Notification that the selected viewpoint has been changed to this new instance.
 void viewpointAdded(Xj3DViewpoint vp)
          Notification that this viewpoint has been appended to the list of available viewpoints.
 void viewpointRemoved(Xj3DViewpoint vp)
          Notification that this viewpoint has been removed from the list of available viewpoints.
 

Method Detail

availableViewpointsChanged

void availableViewpointsChanged(Xj3DViewpoint[] viewpoints)
The list of active viewpoints have been changed to this new list. A new list can be given due to either a new world being loaded, or the active navigation layer has been changed. This method is not called if a single viewpoint is added or removed from the scene.

If the scene contains no viewpoints at all (except the default bindable), then this will be called with a null parameter.

On scene or navigation layer change, it is guaranteed that this method will be called before the notification of the actual bound viewpoint.

Parameters:
An - array of exactly the number of viewpoints in the list

selectedViewpointChanged

void selectedViewpointChanged(Xj3DViewpoint vp)
Notification that the selected viewpoint has been changed to this new instance. There are many different reasons this could happen - new node bound, world changed or even active navigation layer has changed and this is the default in that new layer.

If the file contains no viewpoints or the default viewpoint is bound (due to unbinding all real viewpoints on the stack) then this will be called with a null parameter.

It is guaranteed that this will always contain something from the currently active viewpoint list. If all change, that callback will be called before this one, to ensure consistency.

Parameters:
vp - The viewpoint instance that is now selected or null

viewpointAdded

void viewpointAdded(Xj3DViewpoint vp)
Notification that this viewpoint has been appended to the list of available viewpoints.

Parameters:
vp - The viewpoint instance that was added

viewpointRemoved

void viewpointRemoved(Xj3DViewpoint vp)
Notification that this viewpoint has been removed from the list of available viewpoints.

Parameters:
vp - The viewpoint instance that was added

availableNavigationStatesChanged

void availableNavigationStatesChanged(java.lang.String[] states)
The list of available navigation states has changed to this new list. The list of states corresponds to the X3D-specification defined list and any additional browser-specific state names. If a state is not listed in this array, then the ability to activate it should be disabled (eg greying out the button that represents it). If no states are currently defined, this will contain the default string "NONE", which corresponds to disabling all user selection of navigation and even the ability to navigate.

Parameters:
states - An array of the available state strings.

selectedNavigationStateChanged

void selectedNavigationStateChanged(java.lang.String state)
Notification that the currently selected navigation state has changed to this new value. Selection may be due to the UI interaction, courtesy of a node being bound or the active navigation layer has changed.

Parameters:
state - The name of the state that is now the active state

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium