Package cz.vutbr.fit.layout.text.chunks
Class BoxText
- java.lang.Object
-
- cz.vutbr.fit.layout.text.chunks.BoxText
-
public class BoxText extends Object
A parto of text with connection to source boxes- Author:
- burgetr
-
-
Constructor Summary
Constructors Constructor Description BoxText(SourceBoxList boxes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBoxCount()
List<Box>
getBoxes()
Box
getBoxForPosition(int pos)
int
getIndexForPosition(int pos)
Finds the index of the box that contains the given text position.int[]
getOffsets()
Rectangular
getSubstringBounds(int spos, int epos)
String
getText()
int
length()
String
toString()
-
-
-
Constructor Detail
-
BoxText
public BoxText(SourceBoxList boxes)
-
-
Method Detail
-
getBoxCount
public int getBoxCount()
-
getText
public String getText()
-
getOffsets
public int[] getOffsets()
-
length
public int length()
-
getIndexForPosition
public int getIndexForPosition(int pos)
Finds the index of the box that contains the given text position.- Parameters:
pos
- The position within the complete text- Returns:
- The box index for the text positions within the complete text. Otherwise, -1 is returned.
-
getBoxForPosition
public Box getBoxForPosition(int pos)
-
getSubstringBounds
public Rectangular getSubstringBounds(int spos, int epos)
-
-