org.icepdf.core.pobjects.annotations
Class AnnotationFactory

java.lang.Object
  extended by org.icepdf.core.pobjects.annotations.AnnotationFactory

public class AnnotationFactory
extends java.lang.Object

Factory for build annotations.

Note: Currently only Link annotations are supported.

Since:
4.0

Constructor Summary
AnnotationFactory()
           
 
Method Summary
static Annotation buildAnnotation(Library library, Name subType, java.awt.Rectangle rect)
          Creates a new Annotation object using properties from the annotationState paramater.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationFactory

public AnnotationFactory()
Method Detail

buildAnnotation

public static Annotation buildAnnotation(Library library,
                                         Name subType,
                                         java.awt.Rectangle rect)
Creates a new Annotation object using properties from the annotationState paramater. If no annotaitonState is provided a LinkAnnotation is returned with with a black border. The rect specifies where the annotation should be located in user space.

This call adds the new Annotation object to the document library as well as the document StateManager.

Parameters:
library - library to register annotation with
subType - type of annotation to create
rect - bounds of new annotation specified in user space.
Returns:
new annotation object with the same properties as the one specified in annotaiton state.