public class Section extends java.lang.Object implements java.lang.Comparable<Section>, java.io.Serializable
Constructor and Description |
---|
Section() |
Section(com.itextpdf.text.Rectangle r)
Takes an iText Rectangle and constructs an incomplete section object based off the provided rectangle's bounds.
|
Modifier and Type | Method and Description |
---|---|
void |
addAllWordBoxes(java.util.Set<SimpleRectangle> wordBoxes)
Accepts a set of SimpleRectangle objects, each one representing a word box to be added to this section's set of word boxes.
|
void |
addWordBox(com.itextpdf.text.Rectangle wordBox)
Accepts a single iText Rectangle representing a word box, coverts it into a SimpleRectangle object and adds it to the section's
set of word boxes.
|
int |
compareTo(Section otherSection)
Determines the natural ordering of a section.
|
boolean |
equals(java.lang.Object otherObject)
Equals method for a Section
|
void |
generateWordRows()
Uses this section's set of word boxes to construct the section's word rows.
|
float |
getBottom()
Gets the bottom coordinate of this section.
|
float |
getLeft()
Gets the left coordinate of this section.
|
float |
getRight()
Gets the right coordinate of this section.
|
float |
getTop()
Gets the top coordinate of this section.
|
java.util.Set<SimpleRectangle> |
getWordBoxes()
Gets this section's word boxes.
|
java.util.Set<SimpleRectangle> |
getWordRows()
Gets this section's word rows.
|
boolean |
isComplete()
Gets whether or not this section is complete.
|
void |
setBottom(float bottom)
Sets the bottom coordinate of this section.
|
void |
setIsComplete(boolean isComplete)
Sets the flag that indicates if this section is complete or not.
|
void |
setLeft(float left)
Sets the left coordinate of this section.
|
void |
setRight(float right)
Sets the right coordinate of this section.
|
void |
setTop(float top)
Sets the top coordinate of this section.
|
java.lang.String |
toString()
toString method for a Section
|
public Section()
public Section(com.itextpdf.text.Rectangle r)
r
- a rectangle with a left, right, top and bottom coordinate to use as the bound's of the section to create.public void addWordBox(com.itextpdf.text.Rectangle wordBox)
wordBox
- a rectangle representing a word box to be added to this section's set of word boxes.public void addAllWordBoxes(java.util.Set<SimpleRectangle> wordBoxes)
wordBoxes
- a set of SimpleRectangle objects, each one representing a word box to be added to this section's set of word boxes.public void generateWordRows()
public boolean isComplete()
public java.util.Set<SimpleRectangle> getWordBoxes()
public java.util.Set<SimpleRectangle> getWordRows()
public void setIsComplete(boolean isComplete)
isComplete
- true if this section should be marked as complete, false otherwise.public void setLeft(float left)
left
- the left edge of this section.public void setRight(float right)
right
- the right edge of this section.public void setTop(float top)
top
- the top edge of this section.public void setBottom(float bottom)
bottom
- the bottom edge of this section.public float getLeft()
public float getRight()
public float getTop()
public float getBottom()
public int compareTo(Section otherSection)
compareTo
in interface java.lang.Comparable<Section>
public boolean equals(java.lang.Object otherObject)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object