AnnotationCollection
Inheritance: java.lang.Object, com.aspose.pdf.AnnotationCollection
All Implemented Interfaces: Iterable < Annotation >
public final class AnnotationCollection extends Object implements Iterable < Annotation >
Class representing annotation collection.
Constructors
| Constructor | Description |
|---|---|
| AnnotationCollection | Constructor of AnnotationCollection. Creates annotation collection for annotations on the given page. |
Methods
| Method | Description |
|---|---|
| accept | Accepts visitor to process annotation. |
| add | Adds annotation to the collection. |
| add | Adds annotation to the collection. If page is rotated then annotation rectangle will be recalculated accordingly. |
| clear | Deletes all annotations from the collection. |
| contains | Checks if specified annotation belong to collection. |
| copyTo | Copies array of annotations into collection. |
| delete | Deletes all annotations from the collection. |
| delete | Deletes all annotations from the collection. |
| delete | Deletes annotation from the collection by index. |
| findByName | Returns annotation by its name. |
| get_Item | The index of the element to get. |
| getSyncRoot | Gets an object that can be used to synchronize access to com.aspose.pdf.AnnotationCollection. |
| isReadOnly | Gets a value indicating if collection is readonly. |
| isSynchronized | Gets a value indicating whether access to the com.aspose.pdf.AnnotationCollection is synchronized (thread safe). |
| iterator | Returns collection enumerator. |
| remove | Deletes specified annotation from the collection. |
| size | Gets count of annotations in collection. |
AnnotationCollection
Constructor of AnnotationCollection. Creates annotation collection for annotations on the given page.
accept
Accepts visitor to process annotation.
add
Adds annotation to the collection.
add
Adds annotation to the collection. If page is rotated then annotation rectangle will be recalculated accordingly.
clear
public void clear()
Deletes all annotations from the collection.
contains
Checks if specified annotation belong to collection.
copyTo
Copies array of annotations into collection.
delete
public void delete()
Deletes all annotations from the collection.
delete
Deletes all annotations from the collection.
delete
public void delete(int index)
Deletes annotation from the collection by index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | Index of annotation which shall be deleted. |
findByName
Returns annotation by its name.
get_Item
public Annotation get_Item(int index)
The index of the element to get.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | The index value started from one. |
Returns: Annotation object
getSyncRoot
public Object getSyncRoot()
Gets an object that can be used to synchronize access to com.aspose.pdf.AnnotationCollection.
Returns: Object for sinchronization
isReadOnly
public boolean isReadOnly()
Gets a value indicating if collection is readonly.
Returns: boolean value
isSynchronized
public boolean isSynchronized()
Gets a value indicating whether access to the com.aspose.pdf.AnnotationCollection is synchronized (thread safe).
Returns: boolean value
iterator
public com.aspose.ms.System.Collections.IEnumerator< Annotation > iterator()
Returns collection enumerator.
Returns: Enumerator object
remove
Deletes specified annotation from the collection.
size
public int size()
Gets count of annotations in collection.
Returns: int value