private ElementUI getVisibleChild ( boolean first ) { int count = getChildCount ( ) ; int start = first ? 0 : count - 1 ; int inc = first ? 1 : - 1 ; for ( int i = start ; i >= 0 && i < count ; i += inc ) { ElementUI child = ( ElementUI ) getChild ( i ) ; if ( child . isVisible ( ) ) { return child ; } } return null ; }
Returns first or last visible child .