@ Pure protected Rectangle2d calcBounds ( ) { final Rectangle2d bb = new Rectangle2d ( ) ; boolean first = true ; Rectangle2afp < ? , ? , ? , ? , ? , ? > b ; // Child bounds N child ; for ( int i = 0 ; i < getChildCount ( ) ; ++ i ) { child = getChildAt ( i ) ; if ( child != null ) { b = child . getBounds ( ) ; if ( b != null ) { if ( first ) { first = false ; bb . setFromCorners ( b . getMinX ( ) , b . getMinY ( ) , b . getMaxX ( ) , b . getMaxY ( ) ) ; } else { bb . setUnion ( b ) ; } } } } // Data bounds P primitive ; GeoLocation location ; for ( int i = 0 ; i < getUserDataCount ( ) ; ++ i ) { primitive = getUserDataAt ( i ) ; if ( primitive != null ) { location = primitive . getGeoLocation ( ) ; if ( location != null ) { b = location . toBounds2D ( ) ; if ( b != null ) { if ( first ) { first = false ; bb . setFromCorners ( b . getMinX ( ) , b . getMinY ( ) , b . getMaxX ( ) , b . getMaxY ( ) ) ; } else { bb . setUnion ( b ) ; } } } } } return first ? null : bb ; }
Compute and replies the bounds for this node .