Package org.web3d.browser
Interface ViewpointStatusListener
- All Known Implementing Classes:
DefaultViewpointManager
,SwingViewpointToolbar
public interface ViewpointStatusListener
A listener to track viewpoint list changes.
A listener needs to be aware that there are multiple layers that can come and go in the core of the application. This status listener keeps the user informed of the layer changes and the layer it belongs to. The UI should then adapt it's list to the active layer as needed.
- Version:
- $Revision: 1.3 $
- Author:
- Alan Hudson
-
Method Summary
Modifier and TypeMethodDescriptionvoid
viewpointAdded
(VRMLViewpointNodeType node, int layerId, boolean isDefault) Invoked when a viewpoint has been addedvoid
viewpointBound
(VRMLViewpointNodeType node, int layerId) Invoked when a viewpoint has been bound.void
viewpointLayerActive
(int layerId) The given layer is now made the active layer.void
viewpointLayerAdded
(int layerId) Notification of the addition of a valid layer ID to the current list.void
viewpointLayerRemoved
(int layerId) Notification that a Layer ID is no longer valid.void
viewpointRemoved
(VRMLViewpointNodeType node, int layerId) Invoked when a viewpoint has been removed
-
Method Details
-
viewpointLayerAdded
void viewpointLayerAdded(int layerId) Notification of the addition of a valid layer ID to the current list. This layer is currently empty of viewpoints. Calls toviewpointAdded(org.web3d.vrml.nodes.VRMLViewpointNodeType, int, boolean)
will subsequently follow with all the viewpoints listed in this layer. It can be assumed that the layer is not currently the active layer. A separate notification is available for that.- Parameters:
layerId
- The ID of the layer to be added
-
viewpointLayerRemoved
void viewpointLayerRemoved(int layerId) Notification that a Layer ID is no longer valid. Any viewpoints that have been made available for that layer should now be removed from the layer. TheviewpointRemoved(org.web3d.vrml.nodes.VRMLViewpointNodeType, int)
callback will not be made for this case.- Parameters:
layerId
- The ID of the layer to be added
-
viewpointLayerActive
void viewpointLayerActive(int layerId) The given layer is now made the active layer. If there is a viewpoint list being maintained per-layer then the UI can perform some sort of highlighting to indicate this. Viewpoints in other layers are still allowed to be bound by the user interface. If there was a previously active layer, ignore it.The code will guarantee that if the active layer is removed, then this method will be called first to set a different valid layer, before removing that layer ID.
If a value of -1 is provided, that means no layers are active and that we currently have a completely clear browser with no world loaded. The UI should act appropriately.
- Parameters:
layerId
- The ID of the layer to be made current or -1
-
viewpointAdded
Invoked when a viewpoint has been added- Parameters:
node
- The viewpointlayerId
- The ID of the layer the viewpoint is added toisDefault
- Is the node a default
-
viewpointRemoved
Invoked when a viewpoint has been removed- Parameters:
node
- The viewpointlayerId
- The ID of the layer the viewpoint is removed from
-
viewpointBound
Invoked when a viewpoint has been bound.- Parameters:
node
- The viewpointlayerId
- The ID of the layer the viewpoint is bound on
-