org.faceless.pdf2.viewer2.feature
Class TextSelection.RangeList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList
          extended by org.faceless.pdf2.viewer2.feature.TextSelection.RangeList
All Implemented Interfaces:
Iterable, Collection, List
Enclosing class:
TextSelection

public static class TextSelection.RangeList
extends AbstractList

A RangeList is a read-only list of Range objects. The range may cover more than one page.


Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
TextSelection.RangeList(List list, Comparator order)
          Create a RangeList containing a list of TextSelection.Range objects
TextSelection.RangeList(TextSelection.Range range, Comparator order)
          Create a RangeList containing a single TextSelection.Range
 
Method Summary
 Object get(int index)
           
 float[] getCorners(PDFPage page)
          Get the Corners of the area marked by this highlight.
 Set getPages()
          Return the list of Pages included with this Range
 AttributedString getStyledText()
          Return the text included in this RangeList
 StringBuffer getText()
          Return the text included in this RangeList
 boolean isValid()
          Return true if this list is not empty and every Range it contains is valid, false otherwise
 int 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.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

TextSelection.RangeList

public TextSelection.RangeList(TextSelection.Range range,
                               Comparator order)
Create a RangeList containing a single TextSelection.Range


TextSelection.RangeList

public TextSelection.RangeList(List list,
                               Comparator order)
Create a RangeList containing a list of TextSelection.Range objects

Parameters:
list - the list of TextSelection.Range objects
Method Detail

get

public Object get(int index)
Specified by:
get in interface List
Specified by:
get in class AbstractList

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in interface List
Specified by:
size in class AbstractCollection

isValid

public boolean isValid()
Return true if this list is not empty and every Range it contains is valid, false otherwise


getPages

public Set 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 by PageExtractor.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 class AbstractCollection


Copyright © 2001-2013 Big Faceless Organization