| Advanced Features > Nested Managers and Nested Graphers > Hierarchy Events > Manager Views Changed Events |
Manager Views Changed Events |
INDEX
PREVIOUS
NEXT
|
ManagerViewsChangedEvent events are fired when a view is added to or removed from a manager. In Listener for the Views of a Manager, you have already seen that listeners for these events can be installed on a manager by using the following methods:
void addManagerViewsListener (ManagerViewsChangedListener listener)
void removeManagerViewsListener (ManagerViewsChangedListener listener)
Listeners installed with this API will only receive events when a view is added directly to the manager. In a nested hierarchy of managers, a submanager does not receive the event if the view is added to the root manager of the hierarchy, even though the submanager will be visible in that view.
It is possible to install listeners of the ManagerViewsChangedEvent events so that they also receive the events from the ancestor managers. Use the following API to achieve this:
void addManagerViewsHierarchyListener (ManagerViewsChangedListener listener)
void removeManagerViewsHierarchyListener (ManagerViewsChangedListener listener)
This API can be used on IlvManager, IlvGraphicSet, IlvGraphicHandleBag and their subclasses. If a view is added to the root manager, the event is propagated to all the contained objects that have a listener added with this API.
| Note |
The event is fired at the manager where a view is added or removed. It is propagated recursively to all children that implement the ManagerViewsHierarchyEventReceiver interface. It is not propagated to children whose ancestors don't implement the ManagerViewsHierarchyEventReceiver interface, because the recursive propagation of the event stops on the object that does not implement that interface. For example, if a manager contains an object of type IlvGraphicHandle, which contains an IlvGraphicSet, then the event is not received by the IlvGraphicSet because the IlvGraphicHandle does not implement the interface. However, if the manager contains an object of type IlvFullZoomingGraphic, which contains an IlvGraphicSet, then the event is received by the IlvGraphicSet because both IlvFullZoomingGraphic and IlvGraphicSet implement the interface.
|
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |