Class TextSelection.RangeList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<TextSelection.Range>
-
- org.faceless.pdf2.viewer2.feature.TextSelection.RangeList
-
- All Implemented Interfaces:
Iterable<TextSelection.Range>
,Collection<TextSelection.Range>
,List<TextSelection.Range>
- Enclosing class:
- TextSelection
public static class TextSelection.RangeList extends AbstractList<TextSelection.Range>
ARangeList
is a read-only list ofRange
objects. The range may cover more than one page.
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description RangeList(DocumentPanel docpanel, List<? extends TextSelection.Range> list, Comparator<PageExtractor.Text> order)
Create a RangeList containing a list ofTextSelection.Range
objectsRangeList(DocumentPanel docpanel, TextSelection.Range range, Comparator<PageExtractor.Text> order)
Create a RangeList containing a singleTextSelection.Range
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextSelection.Range
get(int index)
float[]
getCorners(PDFPage page)
Get the Corners of the area marked by this highlight.Set<PDFPage>
getPages()
Return the list of Pages included with this RangeAttributedString
getStyledText()
Return the text included in this RangeListStringBuffer
getText()
Return the text included in this RangeListboolean
isValid()
Return true if this list is not empty and every Range it contains is valid, false otherwiseint
size()
String
toString()
-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
-
-
-
Constructor Detail
-
RangeList
public RangeList(DocumentPanel docpanel, TextSelection.Range range, Comparator<PageExtractor.Text> order)
Create a RangeList containing a singleTextSelection.Range
-
RangeList
public RangeList(DocumentPanel docpanel, List<? extends TextSelection.Range> list, Comparator<PageExtractor.Text> order)
Create a RangeList containing a list ofTextSelection.Range
objects- Parameters:
list
- the list ofTextSelection.Range
objects
-
-
Method Detail
-
get
public TextSelection.Range get(int index)
- Specified by:
get
in interfaceList<TextSelection.Range>
- Specified by:
get
in classAbstractList<TextSelection.Range>
-
size
public int size()
- Specified by:
size
in interfaceCollection<TextSelection.Range>
- Specified by:
size
in interfaceList<TextSelection.Range>
- Specified by:
size
in classAbstractCollection<TextSelection.Range>
-
isValid
public boolean isValid()
Return true if this list is not empty and every Range it contains is valid, false otherwise
-
getPages
public Set<PDFPage> getPages()
Return the list of Pages included with this Range- Since:
- 2.11.8
-
getCorners
public float[] getCorners(PDFPage page)
Get the Corners of the area marked by this highlight. These are in the same order as those returned byPageExtractor.Text.getCorners()
- Parameters:
page
- the PDFPage that we want the corners for.
-
getText
public StringBuffer getText()
Return the text included in this RangeList
-
getStyledText
public AttributedString getStyledText()
Return the text included in this RangeList
-
toString
public String toString()
- Overrides:
toString
in classAbstractCollection<TextSelection.Range>
-
-