public static WComponent getTop ( final WComponent comp ) { WComponent top = comp ; for ( WComponent parent = top . getParent ( ) ; parent != null ; parent = parent . getParent ( ) ) { top = parent ; } return top ; }
Retrieves the top - level WComponent in the tree .