|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.faceless.pdf2.viewer2.feature.TextSelection.Range
public abstract static class TextSelection.Range
A Range represents a selected range of PageExtractor.Text
items.
The range may only cover a single page
Constructor Summary | |
---|---|
TextSelection.Range()
|
Method Summary | |
---|---|
int |
compareTo(Object o)
|
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 firstpositionlast 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextSelection.Range()
Method Detail |
---|
public PDFPage getPage()
PDFPage
this range object relates to.
public abstract PageExtractor.Text getFirst()
PageExtractor.Text
object that is selected
public abstract PageExtractor.Text getLast()
PageExtractor.Text
object that is selected
public 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 firstpositionlast
character lastposition
inclusive.
public int compareTo(Object o)
compareTo
in interface Comparable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |