|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.icepdf.core.pobjects.graphics.text.LinePositionComparator
public class LinePositionComparator
The LinePositionComparator is optionally called by text extraction algorithms to help insure text lines found on a page are ordered using the y coordinates of the bounding box in the cartesian plane's fourth quadrant. The sorting tries to order the line blocks via the coordinate system rather then the order that they were plotted in.
It's assumed that all LineText that is a child of PageText will not be sorted on the x access. The class WordPositionComparator will be used to insure that words are ordered correctly in the parent PageText array.
| Constructor Summary | |
|---|---|
LinePositionComparator()
|
|
| Method Summary | |
|---|---|
int |
compare(AbstractText lt1,
AbstractText lt2)
Compares the y coordinates of the AbstractText bounding box's y coordinate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
|---|
equals |
| Constructor Detail |
|---|
public LinePositionComparator()
| Method Detail |
|---|
public int compare(AbstractText lt1,
AbstractText lt2)
compare in interface java.util.Comparator<AbstractText>lt1 - word text object to comparelt2 - word text object to compare
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||