|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.qoppa.pdf.annotations.AnnotationFactory
| Constructor Summary | |
AnnotationFactory()
|
|
| Method Summary | |
static Callout |
createCallout(String contents)
|
static Circle |
createCircle(String contents)
Constructs a circle annotation with the given content. |
static FileAttachment |
createFileAttachment()
Creates an empty file attachment object. |
static FileAttachment |
createFileAttachment(byte[] fileContents,
String fileName,
String popupText)
Constructs a file attachment annotation. |
static FileAttachment |
createFileAttachment(File attachFile,
String popupText)
Convenience constructor to create a file attachment from a file system file. |
static FileAttachment |
createFileAttachment(InputStream inStream,
String fileName,
String popupText)
Creates a file attachment from an input stream. |
static FreeText |
createFreeText(String contents)
Constructs a free text annotation with the give content. |
static Ink |
createInk(String contents,
Vector polyLines)
Constructs an Ink annotation. |
static Line |
createLine(String contents,
double x1,
double y1,
double x2,
double y2)
Constructs a line annotation with the given content. |
static Line |
createLine(String contents,
double x1,
double y1,
double x2,
double y2,
String intent)
Constructs a line annotation with the given content and intent. |
static Link |
createLink()
Constructs a Link annotation. |
static MarkUpText |
createMarkupText(String contents,
Vector quadList,
String subtype)
Constructs a new MarkupText annotation. |
static Polygon |
createPolygon(String contents,
Vector vertices,
String intent)
Constructs a polygon annotation. |
static Polyline |
createPolyline(String contents,
Vector vertices,
String intent)
Constructs a polyline annotation. |
static Popup |
createPopup(boolean initalOpen)
Constructs a popup annotation with the given open flag. |
static RubberStamp |
createRubberStamp(Image image)
Constructs a rubber stamp annotation with the given image. |
static RubberStamp |
createRubberStamp(String text,
Color color)
Construct a rubber stamp annotation with custom text and custom color. |
static Sound |
createSound(AudioFormat format,
byte[] content)
Constructs a sound annotation from an AudioFormat object and an array of bytes containing the audio content. |
static Sound |
createSound(AudioInputStream audioStream)
Constructs a sound annotation from an AudioInputStream object. |
static Square |
createSquare(String contents)
Constructs a square annotation with the given content. |
static Text |
createText(String contents,
boolean initialOpen,
String iconName)
Construct a Text annotation. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AnnotationFactory()
| Method Detail |
public static FreeText createFreeText(String contents)
contents - The text content.public static Circle createCircle(String contents)
contents - The text contents to display when the annotation is opened.public static Callout createCallout(String contents)
public static FileAttachment createFileAttachment(byte[] fileContents,
String fileName,
String popupText)
throws IOException
fileContents - The binary contents of the file.fileName - The name of the file.popupText - The popup text to display when the mouse hovers over the annotation.
IOException
public static FileAttachment createFileAttachment(File attachFile,
String popupText)
throws IOException
attachFile - The file to attach. The constructor reads the contents of the file into memory.popupText - The popup text to display when the mouse hovers over the annotation.
IOException
public static FileAttachment createFileAttachment(InputStream inStream,
String fileName,
String popupText)
throws IOException
inStream - The input stream to get the file attachment contents from.fileName - The name of the file.popupText - The popup text to display when the mouse hovers over the annotation.
IOException - Thrown when there is any errors reading the input stream.public static FileAttachment createFileAttachment()
public static Ink createInk(String contents,
Vector polyLines)
contents - The text contents to display when the annotation is opened.polyLines - a Vector of polylines. Each element in the Vector is another
Vector containing a list of points to compose a polyline.
public static Line createLine(String contents,
double x1,
double y1,
double x2,
double y2)
contents - The text contents to display when the annotation is opened.x1 - The x coordinate of the origin of the line.y1 - The y coordinate of the origin of the line.x2 - The x coordinate of the end point of the line.y2 - The y coordinate of the end point of the line.
public static Line createLine(String contents,
double x1,
double y1,
double x2,
double y2,
String intent)
contents - The text contents to display when the annotation is opened.x1 - The x coordinate of the origin of the line.y1 - The y coordinate of the origin of the line.x2 - The x coordinate of the end point of the line.y2 - The y coordinate of the end point of the line.intent - The line's "intent", this can be one of the following values: null, Line.LINE_ARROW, Line.LINE_DIMENSION.public static Link createLink()
public static MarkUpText createMarkupText(String contents,
Vector quadList,
String subtype)
contents - The text contents to display when the annotation is opened.quadList - The new list of quadrilaterals that compose this annotation. Each item in the list should
be an array of 4 Point.Double objects.subtype - type of the markup annotations. Possible values are Highlight, Underline, StrikeOut, Squiggly.
public static Polygon createPolygon(String contents,
Vector vertices,
String intent)
contents - The text contents to display when the annotation is opened.vertices - A Vector of points. Each element in the Vector is a
point to compose a polygon.
public static Polyline createPolyline(String contents,
Vector vertices,
String intent)
contents - The text contents to display when the annotation is opened.vertices - A Vector of points. Each element in the Vector is a
point to compose a polyline.public static Popup createPopup(boolean initalOpen)
initalOpen - Flag indicating whether this annotation should be displayed
open initially.public static RubberStamp createRubberStamp(Image image)
image - a java image
public static RubberStamp createRubberStamp(String text,
Color color)
text - the text to display in the stampcolor - the color of the text
public static Sound createSound(AudioFormat format,
byte[] content)
format - The format of the audio.content - The audio content.
public static Sound createSound(AudioInputStream audioStream)
throws IOException
audioStream - The audio stream
IOExceptionpublic static Square createSquare(String contents)
contents - The text contents to display when the annotation is opened.
public static Text createText(String contents,
boolean initialOpen,
String iconName)
contents - The textual content.initialOpen - Flag indicating whether this annotation should be displayed
open initially.iconName - The name of the icon to use when displaying the annotation in its
un-opened mode. Please use one of the constants defined in this class (ICON_XXXX)
to set the name of the icon.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||