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

Field Summary
static int LINK_ANNOTATION
           
 
Constructor Summary
AnnotationFactory()
           
 
Method Summary
static Annotation buildAnnotation(Library library, int type, java.awt.Rectangle rect, AnnotationState annotationState)
          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
 

Field Detail

LINK_ANNOTATION

public static final int LINK_ANNOTATION
See Also:
Constant Field Values
Constructor Detail

AnnotationFactory

public AnnotationFactory()
Method Detail

buildAnnotation

public static Annotation buildAnnotation(Library library,
                                         int type,
                                         java.awt.Rectangle rect,
                                         AnnotationState annotationState)
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
type - type of annotation to create
rect - bounds of new annotation specified in user space.
annotationState - annotation state to copy state rom.
Returns:
new annotation object with the same properties as the one specified in annotaiton state.