com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class AnnotationCollection

  • All Implemented Interfaces:
    com.aspose.ms.System.Collections.ICollection, com.aspose.ms.System.Collections.IEnumerable, Iterable


    public final class AnnotationCollection
    extends Object
    implements com.aspose.ms.System.Collections.ICollection

    Class representing annotation collection.

    • Constructor Summary

      Constructors 
      Constructor and Description
      AnnotationCollection(Page page)
      Constructor of AnnotationCollection.
    • Method Summary

      Methods 
      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 copyTo(com.aspose.ms.System.Array 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 isSynchronized()
      Gets a value indicating whether access to the com.aspose.pdf.AnnotationCollection is synchronized (thread safe).
      com.aspose.ms.System.Collections.IEnumerator iterator()
      Returns collection enumerator.
      int size()
      Gets count of annotations in collection.
    • Constructor Detail

      • AnnotationCollection

        public AnnotationCollection(Page page)

        Constructor of AnnotationCollection. Creates annotation collection for annotations on the given page.

        Parameters:
        page - Parent page of annotations.
    • Method Detail

      • isSynchronized

        public boolean isSynchronized()

        Gets a value indicating whether access to the com.aspose.pdf.AnnotationCollection is synchronized (thread safe).

        Specified by:
        isSynchronized in interface com.aspose.ms.System.Collections.ICollection
        Returns:
        boolean value
      • getSyncRoot

        public Object getSyncRoot()

        Gets an object that can be used to synchronize access to com.aspose.pdf.AnnotationCollection.

        Specified by:
        getSyncRoot in interface com.aspose.ms.System.Collections.ICollection
        Returns:
        Object for sinchronization
      • size

        public int size()

        Gets count of annotations in collection.

        Specified by:
        size in interface com.aspose.ms.System.Collections.ICollection
        Returns:
        int value
      • add

        public void add(Annotation annotation,
               boolean considerRotation)

        Adds annotation to the collection. If page is rotated then annotation rectangle will be recalculated accordingly.

        Parameters:
        annotation - Annotation which shall be added.
        considerRotation - If true and if page is rotated then annotation position will be recaculated accroding to page rotation.
      • add

        public void add(Annotation annotation)

        Adds annotation to the collection.

        Parameters:
        annotation - Annotation which shall be added.
      • delete

        public void delete(int index)

        Deletes annotation from the collection by index.

        Parameters:
        index - Index of annotation which shall be deleted.
      • delete

        public void delete()

        Deletes all annotations from the collection.

      • copyTo

        public void copyTo(com.aspose.ms.System.Array array,
                  int index)

        Copies array of annotations into collection.

        Specified by:
        copyTo in interface com.aspose.ms.System.Collections.ICollection
        Parameters:
        array - Array to copy into collection.
        index - Starting index where colleciton wil lbe copied.
      • iterator

        public com.aspose.ms.System.Collections.IEnumerator iterator()

        Returns collection enumerator.

        Specified by:
        iterator in interface com.aspose.ms.System.Collections.IEnumerable
        Specified by:
        iterator in interface Iterable
        Returns:
        Enumerator object
      • accept

        public void accept(AnnotationSelector visitor)

        Accepts visitor to process annotation.

        Parameters:
        visitor - Annotation selector object.
      • delete

        public void delete(Annotation annotation)

        Deletes specified annotation from the collection.

        Parameters:
        annotation - Annotation which shall be deleted.
      • get_Item

        public Annotation get_Item(int index)

        The index of the element to get.

        Parameters:
        index - The index value started from one.
        Returns:
        Annotation object