Debug Utilities

A few utilities useful for debugging are available in the package ej.widget.util.debug of the widget library.

Count the Number of Widgets or Containers

The methods HierarchyInspector.countNumberOfWidgets(Widget) and HierarchyInspector.countNumberOfContainers(Widget) respectively count the number of widgets and containers in a hierarchy.

It may be used to evaluate the complexity of a hierarchy of widgets.

Count the Maximum Depth of a Hierarchy

The method HierarchyInspector.countMaxDepth(Widget) counts the maximum depth of a hierarchy. In other words, the depth of the widget with the biggest number of parents recursively.

It may be used to evaluate the complexity of a hierarchy of widgets.