org.icepdf.core.pobjects.annotations
Class AnnotationFactory
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LINK_ANNOTATION
public static final int LINK_ANNOTATION
- See Also:
- Constant Field Values
AnnotationFactory
public AnnotationFactory()
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 withtype - type of annotation to createrect - 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.