public interface IAnnotationFactory
Modifier and Type | Method and Description |
---|---|
Callout |
createCallout(String contents)
Constructs a callout annotation with the give content.
|
Circle |
createCircle(String contents)
Constructs a circle annotation with the given content.
|
FileAttachment |
createFileAttachment()
Creates an empty file attachment object.
|
FileAttachment |
createFileAttachment(byte[] fileContents,
String fileName,
String popupText)
Constructs a file attachment annotation.
|
FileAttachment |
createFileAttachment(File attachFile,
String popupText)
Convenience constructor to create a file attachment from a file system file.
|
FileAttachment |
createFileAttachment(InputStream inStream,
String fileName,
String popupText)
Creates a file attachment from an input stream.
|
FreeText |
createFreeText(String contents)
Constructs a free text annotation with the give content.
|
Ink |
createInk(String contents,
Vector polyLines)
Constructs an Ink annotation.
|
Line |
createLine(String contents,
double x1,
double y1,
double x2,
double y2)
Constructs a line annotation with the given content.
|
Line |
createLine(String contents,
double x1,
double y1,
double x2,
double y2,
String intent)
Constructs a line annotation with the given content and intent.
|
Link |
createLink()
Constructs a Link annotation.
|
Polygon |
createPolygon(String contents,
Vector vertices,
String intent)
Constructs a polygon annotation.
|
Polyline |
createPolyline(String contents,
Vector vertices,
String intent)
Constructs a polyline annotation.
|
Popup |
createPopup(boolean initalOpen)
Constructs a popup annotation with the given open flag.
|
Redaction |
createRedaction(String contents)
Constructs a Redaction annotation with the given content.
|
Redaction |
createRedaction(String contents,
Vector quadList)
Constructs a new Redaction annotation defined by the quadList rather than it's rectangular bounds,
unless the quadList is empty.
|
RubberStamp |
createRubberStamp(Image image)
Constructs a rubber stamp annotation with the given image.
|
RubberStamp |
createRubberStamp(String text,
Color color)
Construct a rubber stamp annotation with custom text and custom color.
|
RubberStamp |
createRubberStamp(String text,
Color color,
double scale)
Construct a text rubber stamp annotation.
|
Sound |
createSound(AudioFormat format,
byte[] content)
Constructs a sound annotation from an AudioFormat object and an
array of bytes containing the audio content.
|
Sound |
createSound(AudioInputStream audioStream)
Constructs a sound annotation from an AudioInputStream object.
|
Square |
createSquare(String contents)
Constructs a square annotation with the given content.
|
Text |
createText(String contents,
boolean initialOpen,
String iconName)
Construct a Text annotation.
|
TextMarkup |
createTextMarkup(String contents,
Vector quadList,
String subtype)
Constructs a new TextMarkup annotation.
|
FreeText createFreeText(String contents)
contents
- The text content.Circle createCircle(String contents)
contents
- The text contents to display when the annotation is opened.Callout createCallout(String contents)
contents
- The text content.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
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
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.FileAttachment createFileAttachment()
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.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.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.Link createLink()
TextMarkup createTextMarkup(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.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.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.Popup createPopup(boolean initalOpen)
initalOpen
- Flag indicating whether this annotation should be displayed
open initially.RubberStamp createRubberStamp(Image image)
image
- a java imageRubberStamp createRubberStamp(String text, Color color)
text
- the text to display in the stampcolor
- the color of the textRubberStamp createRubberStamp(String text, Color color, double scale)
text
- the text to display in the stampcolor
- the color of the textscale
- percentage scale for the stamp, 100 = 1:1.Sound createSound(AudioFormat format, byte[] content)
format
- The format of the audio.content
- The audio content.Sound createSound(AudioInputStream audioStream) throws IOException
audioStream
- The audio streamIOException
Square createSquare(String contents)
contents
- The text contents to display when the annotation is opened.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.Redaction createRedaction(String contents)
contents
- The text contents to display when the annotation is opened.Redaction createRedaction(String contents, Vector quadList)
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.