When a submanager is added to or removed from its manager,
a Graphic Bag Hierarchy event is fired. It notifies all objects contained
in the submanager recursively 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 or remove one, you can call the following methods on a submanager
(or on IlvGraphicSet
or IlvGraphicHandleBag
):
void addGraphicBagHierarchyListener (GraphicBagHierarchyListener
listener)
void removeGraphicBagHierarchyListener (GraphicBagHierarchyListener
listener)
getGraphicBag() - this is the object whose graphic bag has changed,
getOldRootBag() - this is the root graphic bag of the entire hierarchy before
the change happened,
getNewRootBag() - this is the root graphic bag of the entire hierarchy after
the change happened.
Note
The event is fired on 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 do not 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.