be.ugent.caagt.swirl

Class SwirlUtilities


public final class SwirlUtilities
extends java.lang.Object

General Swing or SWIRL related methods.

Method Summary

static Component
getChildWithName(Container container, String name)
Returns the first child component with the given name, or null if no such child can be found.
static Component
getDescendantWithName(Container container, String name)
Returns the first descendant with the given name, or null if no such descendant can be found.

Method Details

getChildWithName

public static Component getChildWithName(Container container,
                                         String name)
Returns the first child component with the given name, or null if no such child can be found. Does not consider all descendants but only direct children.

If the container is a menu, then the children of the associated popup menu are searched.


getDescendantWithName

public static Component getDescendantWithName(Container container,
                                              String name)
Returns the first descendant with the given name, or null if no such descendant can be found. The search is performed depth first and parents are processed before their children.

If during the search a menu is encounterd, then the descendants of the associated popup menu are searched.