protected void filterSeparators ( ) { /*int hthreshold = (int) (root.getArea().getDeclaredFontSize() * HSEP_MIN_HEIGHT); int vthreshold = (int) (root.getArea().getDeclaredFontSize() * VSEP_MIN_WIDTH);*/ int hthreshold = getMinHSepHeight ( ) ; int vthreshold = getMinVSepWidth ( ) ; for ( Iterator < Separator > it = hsep . iterator ( ) ; it . hasNext ( ) ; ) { Separator sep = it . next ( ) ; //Adaptive height threshold: use the font size of the box above the separator for determining the em size for the threshold AreaImpl above = root . findContentAbove ( sep ) ; if ( above != null ) hthreshold = ( int ) ( above . getFontSize ( ) * HSEP_MIN_HEIGHT ) ; else hthreshold = ( int ) ( root . getFontSize ( ) * HSEP_MIN_HEIGHT ) ; //System.out.println("For: " + sep + " limit " + hthreshold + " area " + above); if ( sep . getWeight ( ) < hthreshold ) it . remove ( ) ; //System.out.println("removed"); else if ( sep . getWidth ( ) / ( double ) sep . getHeight ( ) < SEP_MIN_RATIO ) it . remove ( ) ; } for ( Iterator < Separator > it = vsep . iterator ( ) ; it . hasNext ( ) ; ) { Separator sep = it . next ( ) ; if ( sep . getWeight ( ) < vthreshold ) it . remove ( ) ; else if ( sep . getHeight ( ) / ( double ) sep . getWidth ( ) < SEP_MIN_RATIO ) it . remove ( ) ; } }
Removes all the separators where the weight is lower than the specified threshold .