public class AnnotationFactory extends Object
| Constructor and Description |
|---|
AnnotationFactory() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getCurrentDateAsString()
Create a String to represent the current date.
|
static BufferedImage |
getIcon(PdfObject form)
Determine the type of annotation from the sub type value and call
appropriate method to create an icon for the annotation
|
static BufferedImage |
getIcon(PdfObject form,
float scaling)
Determine the type of annotation from the sub type value and call
appropriate method to create an icon for the annotation with the given
scaling applied
|
static String |
getPngImageForAnnotation(PdfObject form)
Get the image to be used to display an annotation based on the Name
variable it contains.
|
static BufferedImage |
getTextIcon(PdfObject form)
Get the Icon to be used for Text annotations
|
static void |
loadFontValues(byte[] DS,
Component textInput,
float scaling)
Load the font style described in a DS string into a Component for use by
some annotations (e.g FreeText annotations).
|
static void |
renderFlattenedAnnotation(PdfObject form,
DynamicVectorRenderer current,
int pageNumber,
int rotation)
Method to create an icon to represent the annotation and render it.
|
static float[] |
scanInkListTree(Object[] InkListArray,
PdfObject form,
Graphics g)
Method to scan through an InkList array, draw the ink to the provided
Graphics object and return the bounds of the InkList
|
static float[] |
scanInkListTree(Object[] InkListArray,
PdfObject form,
Graphics g,
float scaling)
Method to scan through an InkList array, draw the ink to the provided
Graphics object at the specified scaling and return the bounds of the InkList
|
public static BufferedImage getIcon(PdfObject form)
form - PdfObject containing the annotationpublic static BufferedImage getIcon(PdfObject form, float scaling)
form - PdfObject containing the annotationscaling - Scaling to display the annotation atpublic static float[] scanInkListTree(Object[] InkListArray, PdfObject form, Graphics g)
InkListArray - Object array representing an InkListform - FormObject for the Ink annotation this InkList came fromg - Graphics object to draw the Ink topublic static float[] scanInkListTree(Object[] InkListArray, PdfObject form, Graphics g, float scaling)
InkListArray - Object array representing an InkListform - FormObject representing the Ink annotation this InkList came fromg - Graphics object to draw the Ink toscaling - float value representing scaling where 1 equals 100%public static BufferedImage getTextIcon(PdfObject form)
form - PdfObject representing a TextAnnotationpublic static void loadFontValues(byte[] DS,
Component textInput,
float scaling)
DS - byte[] representing the DS stringtextInput - Component to be used by a given annotationscaling - float value representing scaling where 1 is equal to 100%public static String getPngImageForAnnotation(PdfObject form)
form - PdfObject representing a form Objectpublic static void renderFlattenedAnnotation(PdfObject form, DynamicVectorRenderer current, int pageNumber, int rotation)
form - :: PdfObject to hold the annotation datacurrent - :: DynamicVectorRender to draw the annotationpageNumber - :: Int value of the page numberrotation - :: Int value of the page rotationpublic static String getCurrentDateAsString()
Copyright © 2017. All rights reserved.