public abstract static class TextSelection.Range extends Object
PageExtractor.Text
items.
The range may only cover a single pageConstructor and Description |
---|
Range() |
Modifier and Type | Method and Description |
---|---|
static TextSelection.Range |
createRange(PageExtractor.Text text)
Create a new Range that matches the specified text item
|
static TextSelection.Range |
createRange(PageExtractor.Text first,
int firstposition,
PageExtractor.Text last,
int lastposition)
Create a new Range that covers the range of text from
first
character firstposition . to last character lastposition
inclusive. |
abstract PageExtractor.Text |
getFirst()
Return the first
PageExtractor.Text object that is selected |
abstract int |
getFirstPosition()
Return offset into the Text item returned by
getFirst() that
begins the selection. |
abstract PageExtractor.Text |
getLast()
Return the last
PageExtractor.Text object that is selected |
abstract int |
getLastPosition()
Return offset into the Text item returned by
getLast() that
ends the selection. |
PDFPage |
getPage()
Return the
PDFPage this range object relates to. |
AttributedString |
getStyledText()
Return the text this Range covers
|
StringBuffer |
getText()
Return the text this Range covers
|
abstract boolean |
isValid()
Return true if this Range is valid, false otherwise
|
public abstract PageExtractor.Text getFirst()
PageExtractor.Text
object that is selectedpublic abstract PageExtractor.Text getLast()
PageExtractor.Text
object that is selectedpublic abstract int getFirstPosition()
getFirst()
that
begins the selection.public abstract int getLastPosition()
getLast()
that
ends the selection. Note this is the offset of the last selected character,
not the first unselected character.public StringBuffer getText()
public AttributedString getStyledText()
public abstract boolean isValid()
public static TextSelection.Range createRange(PageExtractor.Text text)
public static TextSelection.Range createRange(PageExtractor.Text first, int firstposition, PageExtractor.Text last, int lastposition)
first
character firstposition
. to last
character lastposition
inclusive.first
- the first textfirstposition
- the offset into the first text to start atlast
- the last textlastposition
- the offset into the last text to end atCopyright © 2001-2017 Big Faceless Organization