public Area findBasicAreas ( ) { AreaImpl rootarea = new AreaImpl ( 0 , 0 , 0 , 0 ) ; setRoot ( rootarea ) ; rootarea . setAreaTree ( this ) ; rootarea . setPage ( page ) ; for ( int i = 0 ; i < page . getRoot ( ) . getChildCount ( ) ; i ++ ) { Box cbox = page . getRoot ( ) . getChildAt ( i ) ; Area sub = new AreaImpl ( cbox ) ; if ( sub . getWidth ( ) > 1 || sub . getHeight ( ) > 1 ) { findStandaloneAreas ( page . getRoot ( ) . getChildAt ( i ) , sub ) ; rootarea . appendChild ( sub ) ; } } createGrids ( rootarea ) ; return rootarea ; }
Creates the area tree skeleton - selects the visible boxes and converts them to areas