Advanced Features > Nested Managers and Nested Graphers > Nested Managers > Traversing Nested Managers

Once a manager has been added in a manager, it is no different from any other graphic object. Nevertheless, the manager contains a set of methods that allow you to have quick access to the managers added in a manager and to the manager hierarchy in general.

You can obtain an enumeration of the managers present in a submanager using the method:

IlvGraphicEnumeration getManagers()

and a count of how many managers are present with the method:

int getManagersCount()

The same methods can be applied to a particular layer:

IlvGraphicEnumeration getManagers(int layer)
int getManagersCount(int layer)

Note that these methods will return the submanagers at the first level of the hierarchy only. Using these methods is much more efficient than traversing the list of all objects present in a manager.

You can also traverse up the hierarchy of managers, using the method:

IlvManager getParent()

In our small example (see Example: Adding a Nested Manager) the following line would return toplevel:

subManager.getParent()

For a manager at the top level, this method returns null.