public final class AnnotationCollection extends Object implements Iterable<Annotation>
Class representing annotation collection.
Constructor and Description |
---|
AnnotationCollection(Page page)
Constructor of AnnotationCollection.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(AnnotationSelector visitor)
Accepts visitor to process annotation.
|
void |
add(Annotation annotation)
Adds annotation to the collection.
|
void |
add(Annotation annotation,
boolean considerRotation)
Adds annotation to the collection.
|
void |
clear()
Deletes all annotations from the collection.
|
boolean |
contains(Annotation annotation)
Checks if specified annotation belong to collection.
|
void |
copyTo(Annotation[] array,
int index)
Copies array of annotations into collection.
|
void |
delete()
Deletes all annotations from the collection.
|
void |
delete(Annotation annotation)
Deletes specified annotation from the collection.
|
void |
delete(int index)
Deletes annotation from the collection by index.
|
Annotation |
get_Item(int index)
The index of the element to get.
|
Object |
getSyncRoot()
Gets an object that can be used to synchronize access to com.aspose.pdf.AnnotationCollection.
|
boolean |
isReadOnly()
Gets a value indicating if collection is readonly.
|
boolean |
isSynchronized()
Gets a value indicating whether access to the com.aspose.pdf.AnnotationCollection is
synchronized (thread safe).
|
com.aspose.ms.System.Collections.IEnumerator<Annotation> |
iterator()
Returns collection enumerator.
|
boolean |
remove(Annotation annotation)
Deletes specified annotation from the collection.
|
int |
size()
Gets count of annotations in collection.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public AnnotationCollection(Page page)
Constructor of AnnotationCollection. Creates annotation collection for annotations on the given page.
page
- Parent page of annotations.public boolean isSynchronized()
Gets a value indicating whether access to the com.aspose.pdf.AnnotationCollection is synchronized (thread safe).
public Object getSyncRoot()
Gets an object that can be used to synchronize access to com.aspose.pdf.AnnotationCollection.
public int size()
Gets count of annotations in collection.
public boolean isReadOnly()
Gets a value indicating if collection is readonly.
public void add(Annotation annotation, boolean considerRotation)
Adds annotation to the collection. If page is rotated then annotation rectangle will be recalculated accordingly.
annotation
- Annotation which shall be added.considerRotation
- If true and if page is rotated then annotation position will be recaculated accroding
to page
rotation.public void add(Annotation annotation)
Adds annotation to the collection.
annotation
- Annotation which shall be added.public void delete(int index)
Deletes annotation from the collection by index.
index
- Index of annotation which shall be deleted.public void delete()
Deletes all annotations from the collection.
public void copyTo(Annotation[] array, int index)
Copies array of annotations into collection.
array
- Array to copy into collection.index
- Starting index where colleciton wil lbe copied.public com.aspose.ms.System.Collections.IEnumerator<Annotation> iterator()
Returns collection enumerator.
iterator
in interface Iterable<Annotation>
public void accept(AnnotationSelector visitor)
Accepts visitor to process annotation.
visitor
- Annotation selector object.public void delete(Annotation annotation)
Deletes specified annotation from the collection.
annotation
- Annotation which shall be deleted.public void clear()
Deletes all annotations from the collection.
public boolean contains(Annotation annotation)
Checks if specified annotation belong to collection.
annotation
- Annotation to be searched.public boolean remove(Annotation annotation)
Deletes specified annotation from the collection.
annotation
- Annotation which shall be deleted.public Annotation get_Item(int index)
The index of the element to get.
index
- The index value started from one.