| Advanced Features > Nested Managers and Nested Graphers > Hierarchy Events > Graphic Bag Hierarchy Events |
Graphic Bag Hierarchy Events |
INDEX
PREVIOUS
NEXT
|
When a submanager is added to or removed from its manager, a Graphic Bag Hierarchy event is fired. It notifies recursively all objects contained in the submanager that the root of the submanager nesting hierarchy has changed. The objects that can receive this event are IlvManager, IlvGraphicSet, IlvGraphicHandleBag and their subclasses.
In order to add a listener for Graphic Bag Hierarchy events, you can call on a submanager (or on IlvGraphicSet or IlvGraphicHandleBag):
void addGraphicBagHierarchyListener (GraphicBagHierarchyListener listener)
void removeGraphicBagHierarchyListener (GraphicBagHierarchyListener listener)
The GraphicBagHierarchyEvent contains the following information:
getGraphicBag() - this is the object whose graphic bag has changed,
getOldRootBag() - this is the root graphic bag of the entire hierarchy before the change happend,
getNewRootBag() - this is the root graphic bag of the entire hierarchy after the change happend.
| Note |
The event is fired at the manager, graphic set or graphic handle bag whose graphic bag has changed. It is propagated recursively to all children that implement the GraphicBagHierarchyEventReceiver interface. It is not propagated to children whose ancestors don't implement the GraphicBagHierarchyEventReceiver 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 |