|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.annotation.wordfreak.AbstractAnnotationView
org.annotation.wordfreak.AbstractListAnnotationView
Field Summary | |
protected AnnotationFilter |
annoFilter
|
protected java.util.List |
anns
List of annotations this view handles based on annoFilter. |
protected java.util.List |
base
List of annotation on which other annotations can be constructed based on baseFilter. |
protected AnnotationFilter |
baseFilter
|
protected java.util.List |
filt
Subset of anns based on current filter applied. |
protected AnnotationFilter |
filter
|
protected java.util.List |
sort
Sorted version of filt based on comparator. |
protected java.util.Comparator |
sortComparator
|
Fields inherited from class org.annotation.wordfreak.AbstractAnnotationView |
selectionMode, treeDataListeners |
Constructor Summary | |
AbstractListAnnotationView()
|
Method Summary | |
void |
filter(AnnotationFilter f)
Applies the specified filter to this view. |
Annotation |
getAnnotation(int i)
Returns sorted annotation at index i. |
java.util.Iterator |
getAnnotationIterator()
Returns Iterator for filtered/sorted annotations. |
int |
getAnnotationSize()
Returns size of filtered/sorted annotations. |
Annotation |
getBase(int i)
Returns the annotation at the specified index from the list of annotations which new annotation are based on. |
java.util.Iterator |
getBaseIterator()
Returns an iterator over the list of annotations which new annotation are based on. |
int |
getBaseSize()
Returns the number of annotation in the list of annotations which new annotation are based on. |
int |
getSize()
|
Annotation |
getUnsortedAnnotation(int i)
Returns filtered annotation at index i. |
int |
indexOfAnnotation(Annotation a)
Returns index of Annotation a in sorted annotations list if it is contained in the list; otherwise, (-(insertion point) - 1). |
int |
indexOfAnnotationOffset(int o)
Returns index of sorted annotation which contains the offset o or the offset of the annotation which is closest. |
int |
indexOfBase(Annotation a)
Returns index of Annotation a in base annotations list if it is contained in the list; otherwise, (-(insertion point) - 1). |
int |
indexOfBaseOffset(int o)
Returns the index of an annotation in the list of annotations which new annotation are based on which contains the specified offset. |
int |
indexOfUnsortedAnnotation(Annotation a)
Returns index of the annotation in the filtered annotations list if it is contained in the list; otherwise, (-(insertion point) - 1). |
void |
sort(java.util.Comparator c)
Sorts the annotations in this view based on the specified comparison criteria. |
Methods inherited from class org.annotation.wordfreak.AbstractAnnotationView |
addTreeModelListener, close, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesMoved, fireTreeNodesRemoved, fireTreeStructureChanged, getFirstLeaf, getLastLeaf, getParent, getSelectionMode, getSortedAnnotations, getSource, removeTreeModelListener, setSelectionMode, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.annotation.wordfreak.AnnotationView |
binarySearchAnnotation, binarySearchBase, chainAnnotations, containsAll, createRelation, deepInsert, deepInsert, getChain, getContainingLeaf, getNextLeaf, getPath, getPreviousLeaf, getRelation, getRelations, getRelations, getRelations, getValidSelection, getValidSelection, insert, insert, insert, insert, insert, insert, insertParent, insertParent, insertZeroLengthAnnotationAfter, insertZeroLengthAnnotationAfter, insertZeroLengthAnnotationBefore, insertZeroLengthAnnotationBefore, isTerminalSpan, move, put, put, remove, remove, remove, remove, removeFromChain, resetSelection, terminalInsert, update |
Methods inherited from interface javax.swing.tree.TreeModel |
getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, valueForPathChanged |
Field Detail |
protected AnnotationFilter annoFilter
protected AnnotationFilter baseFilter
protected AnnotationFilter filter
protected java.util.Comparator sortComparator
protected java.util.List filt
protected java.util.List anns
protected java.util.List base
protected java.util.List sort
Constructor Detail |
public AbstractListAnnotationView()
Method Detail |
public int getSize()
public Annotation getBase(int i)
AnnotationView
i
- The index of the annotation to be returned.
public int getBaseSize()
AnnotationView
public java.util.Iterator getBaseIterator()
AnnotationView
public Annotation getAnnotation(int i)
AnnotationView
i
- index
public Annotation getUnsortedAnnotation(int i)
AnnotationView
i
- index
public int getAnnotationSize()
AnnotationView
public java.util.Iterator getAnnotationIterator()
AnnotationView
public int indexOfAnnotation(Annotation a)
AnnotationView
a
- Annotation.
public int indexOfAnnotationOffset(int o)
AnnotationView
o
- offset.
public int indexOfUnsortedAnnotation(Annotation a)
AnnotationView
a
- Annotation.
public int indexOfBase(Annotation a)
AnnotationView
a
- The annotation whose index is being searched for.
public int indexOfBaseOffset(int o)
AnnotationView
o
- The offset the base annotation at the returned index will contain.
public void sort(java.util.Comparator c)
AnnotationView
c
- The criteria on which the sort is based.public void filter(AnnotationFilter f)
AnnotationView
f
- The filter to be applied to this view.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |