final boolean isRecursivelyVisibleUpToHeavyweightContainer(){
  if (!isLightweight()) {
    return true;
  }
  for (Container cont=this; cont != null && cont.isLightweight(); cont=cont.getContainer()) {
    if (!cont.isVisible()) {
      return false;
    }
  }
  return true;
}

final boolean isRecursivelyVisibleUpToHeavyweightContainer ( ) { if ( ! isLightweight ( ) ) { return true ; } for ( Container cont = this ; cont != null && cont . isLightweight ( ) ; cont = cont . getContainer ( ) ) { if ( ! cont . isVisible ( ) ) { return false ; } } return true ; }
checks if the container and its direct lightweight containers are visible . consider the heavyweight container hides or shows the hw descendants automatically . therefore we care of lw containers ' visibility only . this method must be invoked under the treelock .
