|
Gnostice PDFOne
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gnostice.pdfone.PdfAnnot
com.gnostice.pdfone.PdfProAnnot
com.gnostice.pdfone.PdfInkAnnot
This represents an ink annotation. An ink-annotation is identified by a "free-hand scribble" made up one or more lines. The lines are specified by the x-y coordinates of their vertices.
// Create a PDF page PdfPage page = new PdfPage(); // Create a PDF font PdfFont fontHelvetica = PdfFont.create("Helvetica", 15,PdfEncodings.WINANSI); fontHelvetica.setColor(Color.BLUE); // Create a single-scribble ink annotation and set its // properties double ver1[] = { 100, 360, 150, 410, 200, 360, 250, 410, 300, 360, 350, 410, 400, 360, 450, 410}; PdfInkAnnot inkAnnot1 = new PdfInkAnnot(ver1, "Single-Dimensional Ink Annotation Demo", "This is an Ink Annotation", "Demo"); inkAnnot1.setColor(Color.BLUE); // Create a multi-scribble ink annotation and set its // properties double[][] ver2 = new double[][] { {100, 100, 150, 150, 200, 100, 250, 150}, {100, 150, 150, 200, 200, 150, 250, 200}, {100, 200, 150, 250, 200, 200, 250, 250}, {100, 250, 150, 300, 200, 250, 250, 300} }; PdfInkAnnot inkAnnot2 = new PdfInkAnnot(ver2, "Multi-Dimensional Ink Annotation Demo", "This is an Ink Annotation", "Demo"); inkAnnot2.setColor(Color.ORANGE); // Add the ink annotations to the page page.addAnnotation(inkAnnot1); page.addAnnotation(inkAnnot2);
Field Summary |
Constructor Summary | |
PdfInkAnnot()
Zero-argument default constructor. |
|
PdfInkAnnot(double[][] vertices,
Color c)
Constructs a multi-scribble ink annotation with specified vertices, subject, content, title, flags, and color. |
|
PdfInkAnnot(double[][] vertices,
int flags)
Constructs a multi-scribble ink annotation with specified vertices, subject, content, title, flags, and color. |
|
PdfInkAnnot(double[][] vertices,
int flags,
Color c)
Constructs a multi-scribble ink annotation with specified vertices, subject, content, title, flags, and color. |
|
PdfInkAnnot(double[][] vertices,
String subject,
String contents,
String title)
Constructs a multi-scribble ink annotation with specified vertices, and popup subject, content and title. |
|
PdfInkAnnot(double[][] vertices,
String subject,
String contents,
String title,
Color c)
Constructs a multi-scribble ink annotation with specified vertices, popup subject, content and title, and color. |
|
PdfInkAnnot(double[][] vertices,
String subject,
String contents,
String title,
int flags)
Constructs a multi-scribble ink annotation with specified vertices, popup subject, content and title, and flags. |
|
PdfInkAnnot(double[][] vertices,
String subject,
String contents,
String title,
int flags,
Color c)
Constructs a multi-scribble ink annotation with specified vertices, popup subject, content and title, flags, and color. |
|
PdfInkAnnot(double[] vertices,
Color c)
Constructs an ink annotation with specified vertices, subject, content, title, flags, and color. |
|
PdfInkAnnot(double[] vertices,
int flags)
Constructs an ink annotation with specified vertices and flags. |
|
PdfInkAnnot(double[] vertices,
int flags,
Color c)
Constructs a ink annotation with specified vertices, subject, content, title, flags, and color. |
|
PdfInkAnnot(double[] vertices,
String subject,
String contents,
String title)
Constructs an ink annotation with specified vertices, and popup subject, content and title. |
|
PdfInkAnnot(double[] vertices,
String subject,
String contents,
String title,
Color c)
Constructs an ink annotation with specified vertices, popup subject, content and title, and color. |
|
PdfInkAnnot(double[] vertices,
String subject,
String contents,
String title,
int flags)
Constructs an ink annotation with specified vertices, popup subject, content and title, and flags. |
|
PdfInkAnnot(double[] vertices,
String subject,
String contents,
String title,
int flags,
Color c)
Constructs an ink annotation with specified vertices, popup subject, content, and title, flags, and color. |
|
PdfInkAnnot(PdfRect r,
Color c)
Deprecated. Instead, use PdfInkAnnot(double[], Color) . |
|
PdfInkAnnot(PdfRect r,
int flags)
Deprecated. Instead, use PdfInkAnnot(double[], int) . |
|
PdfInkAnnot(PdfRect r,
int flags,
Color c)
Deprecated. Instead, use PdfInkAnnot(double[], int, Color) . |
|
PdfInkAnnot(PdfRect r,
String subject,
String contents,
String title)
Deprecated. Instead, use PdfInkAnnot(double[], String, String, String) . |
|
PdfInkAnnot(PdfRect r,
String subject,
String contents,
String title,
Color c)
Deprecated. Instead, use PdfInkAnnot(double[], String, String, String, Color) . |
|
PdfInkAnnot(PdfRect r,
String subject,
String contents,
String title,
int flags)
Deprecated. Instead, use PdfInkAnnot(double[], String, String, String, int) . |
|
PdfInkAnnot(PdfRect r,
String subject,
String contents,
String title,
int flags,
Color c)
Deprecated. Instead, use PdfInkAnnot(double[], String, String, String, int, Color) . |
|
PdfInkAnnot(PdfRect r,
String subject,
String contents,
String title,
int flags,
Color c,
double[][] vertices)
Deprecated. Instead, use PdfInkAnnot(double[], String, String, String, int, Color) . |
Method Summary | |
Object |
clone()
|
PdfAppearanceStream |
getDownAppearance()
Returns the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field and holds down the mouse button. |
PdfAppearanceStream |
getNormalAppearance()
Returns the default appearance stream that needs to be used by a viewer application to display the annotation/form field (that is, when the user is not interacting with the annotation/form field). |
PdfPopUpAnnot |
getPopup()
Returns a popup annotation that needs to be used by a viewer application to display the popup window for this annotation. |
PdfAppearanceStream |
getRolloverAppearance()
Returns the appearance stream that needs to be used by a viewer application to display the annotation when the user places the mouse pointer over the annotation (and does not hold down the mouse button). |
float |
getTransparency()
|
double[][] |
getVertices()
Returns x-y coordinates of the vertices of the lines that form the "free-hand scribble(s)" of the ink annotation. |
void |
setDownAppearance(PdfAppearanceStream downAppearance)
Specifies the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field and holds down the mouse button. |
void |
setNormalAppearance(PdfAppearanceStream normalAppearance)
Specifies the default appearance stream that needs to be used by a viewer application to display the annotation/form field (that is, when the user is not interacting with the annotation/form field). |
void |
setPopup(PdfPopUpAnnot popup,
boolean overridePopUpProperties)
Specifies a popup annotation that needs to be used by a viewer application to display the popup window for this annotation. |
void |
setRect(double x,
double y,
double width,
double height)
Specifies annotation rectangle for this annotation at ( x , y )
with specified width and height. |
void |
setRect(double x,
double y,
double width,
double height,
int mu)
Specifies annotation rectangle for this annotation in specified measurement unit. |
void |
setRect(PdfRect r)
Specifies PdfRect object as
annotation rectangle
for this annotation. |
void |
setRect(PdfRect r,
int mu)
Specifies PdfRect object as
annotation rectangle for this annotation in specified
measurement unit. |
void |
setRect(Rectangle r)
Specifies Rectangle object as
annotation rectangle for this annotation. |
void |
setRolloverAppearance(PdfAppearanceStream rolloverAppearance)
Specifies the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field (and does not hold down the mouse button). |
void |
setTransparency(float transparecyLevel)
|
void |
setVertices(double[] vertices)
Specifies vertices of the lines that need to form the "free-hand scribble" of the ink annotation. |
void |
setVertices(double[][] vertices)
Specifies vertices of the lines that need to form the "free-hand scribbles" of the multi-scriblle ink annotation. |
void |
setVertices(double[][] vertices,
int measurementUnit)
Specifies vertices of the lines that need to form the "free-hand scribbles" of the multi-scriblle ink annotation in specified measurement unit. |
void |
setVertices(double[] vertices,
int measurementUnit)
Specifies vertices of the lines that need to form the "free-hand scribble" of the ink annotation in specified measurement unit. |
Methods inherited from class com.gnostice.pdfone.PdfAnnot |
delete, getAnnotName, getBorderStyle, getBorderWidth, getBottom, getColor, getContents, getDashPattern, getFlags, getLeft, getRect, getRight, getSubject, getTitle, getTop, getType, hashCode, isDeleted, isShowRect, setAnnotName, setBorderStyle, setBorderWidth, setColor, setContents, setDashPattern, setFlags, setShowRect, setSubject, setTitle |
Methods inherited from class java.lang.Object |
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PdfInkAnnot()
public PdfInkAnnot(PdfRect r, String subject, String contents, String title, int flags, Color c, double[][] vertices) throws IOException, PdfException
PdfInkAnnot(double[], String, String, String, int, Color)
.
public PdfInkAnnot(PdfRect r, String subject, String contents, String title) throws IOException, PdfException
PdfInkAnnot(double[], String, String, String)
.
public PdfInkAnnot(double[] vertices, String subject, String contents, String title) throws IOException, PdfException
vertices
- x- and y-coordinates of the vertices of the lines
that need to form the "free-hand scribble" of the
ink annotation (x1, y1,
x2, y2, x3,
y3 ... xn, yn)subject
- text that needs to be displayed in the title bar of
the annotation's popup windowcontents
- text that needs to be used as the contents of the
annotation's popup windowtitle
- text that needs to be used as the subject of the
annotation's popup window
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfInkAnnot(double[][] vertices, String subject, String contents, String title) throws IOException, PdfException
vertices
- x- and y-coordinates of the vertices of the lines
that need to form the "free-hand scribbles" of the
ink annotation (x1, y1,
x2, y2, x3,
y3 ... xn, yn)subject
- text that needs to be displayed in the title bar of
the annotation's popup windowcontents
- text that needs to be used as the contents of the
annotation's popup windowtitle
- text that needs to be used as the subject of the
annotation's popup window
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfInkAnnot(PdfRect r, String subject, String contents, String title, Color c) throws IOException, PdfException
PdfInkAnnot(double[], String, String, String, Color)
.
public PdfInkAnnot(double[] vertices, String subject, String contents, String title, Color c) throws IOException, PdfException
vertices
- x- and y-coordinates of the vertices of the lines
that need to form the "free-hand scribble" of the
ink annotation (x1, y1,
x2, y2, x3,
y3 ... xn, yn)subject
- text that needs to be displayed in the title bar of
the annotation's popup windowcontents
- text that needs to be used as the contents of the
annotation's popup windowtitle
- text that needs to be used as the subject of the
annotation's popup windowc
- color of the "free-hand scribble" and the borders of
the annotation's popup window
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfInkAnnot(double[][] vertices, String subject, String contents, String title, Color c) throws IOException, PdfException
vertices
- x- and y-coordinates of the vertices of the lines
that need to form the "free-hand scribbles" of the
ink annotation (x1, y1,
x2, y2, x3,
y3 ... xn, yn)subject
- text that needs to be displayed in the title bar of
the annotation's popup windowcontents
- text that needs to be used as the contents of the
annotation's popup windowtitle
- text that needs to be used as the subject of the
annotation's popup windowc
- color of the "free-hand scribbles" and the borders
of the annotation's popup window
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfInkAnnot(PdfRect r, String subject, String contents, String title, int flags) throws IOException, PdfException
PdfInkAnnot(double[], String, String, String, int)
.
public PdfInkAnnot(double[] vertices, String subject, String contents, String title, int flags) throws IOException, PdfException
vertices
- x- and y-coordinates of the vertices of the lines
that need to form the "free-hand scribble" of the
ink annotation (x1, y1,
x2, y2, x3,
y3... xn, yn)subject
- text that needs to be displayed in the title bar of
the annotation's popup windowcontents
- text that needs to be used as the contents of the
annotation's popup windowtitle
- text that needs to be used as the subject of the
annotation's popup windowflags
- flag
or combined
value of flags representing characteristics of the
annotation
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfInkAnnot(double[][] vertices, String subject, String contents, String title, int flags) throws IOException, PdfException
vertices
- x- and y-coordinates of the vertices of the lines
that need to form the "free-hand scribbles" of the
ink annotation (x1, y1,
x2, y2, x3,
y3 ... xn, yn)subject
- text that needs to be displayed in the title bar of
the annotation's popup windowcontents
- text that needs to be used as the contents of the
annotation's popup windowtitle
- text that needs to be used as the subject of the
annotation's popup windowflags
- flag
or combined
value of flags representing characteristics of the
annotation
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfInkAnnot(PdfRect r, String subject, String contents, String title, int flags, Color c) throws IOException, PdfException
PdfInkAnnot(double[], String, String, String, int, Color)
.
public PdfInkAnnot(double[] vertices, String subject, String contents, String title, int flags, Color c) throws IOException, PdfException
vertices
- x- and y-coordinates of the vertices of the lines
that need to form the "free-hand scribble" of the
ink annotation (x1, y1,
x2, y2, x3,
y3 ... xn, yn)subject
- text that needs to be displayed in the title bar of
the annotation's popup windowcontents
- text that needs to be used as the contents of the
annotation's popup windowtitle
- text that needs to be used as the subject of the
annotation's popup windowflags
- flag
or combined
value of flags representing characteristics of the
annotationc
- color of the "free-hand scribble" and the borders of
the annotation's popup window
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfInkAnnot(double[][] vertices, String subject, String contents, String title, int flags, Color c) throws IOException, PdfException
vertices
- x- and y-coordinates of the vertices of the lines
that need to form the "free-hand scribbles" of the
ink annotation (x1, y1,
x2, y2, x3,
y3 ... xn, yn)subject
- text that needs to be displayed in the title bar of
the annotation's popup windowcontents
- text that needs to be used as the contents of the
annotation's popup windowtitle
- text that needs to be used as the subject of the
annotation's popup windowflags
- flag
or combined
value of flags representing characteristics of the
annotationc
- color of the "free-hand scribbles" and the borders of
the annotation's popup window
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfInkAnnot(PdfRect r, int flags) throws IOException, PdfException
PdfInkAnnot(double[], int)
.
public PdfInkAnnot(double[] vertices, int flags) throws IOException, PdfException
vertices
- x- and y-coordinates of the vertices of the lines
that need to form the "free-hand scribble" of the
ink annotation (x1, y1,
x2, y2, x3,
y3 ... xn, yn)flags
- flag
or combined
value of flags representing characteristics of the
annotation
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfInkAnnot(double[][] vertices, int flags) throws IOException, PdfException
vertices
- x- and y-coordinates of the vertices of the lines
that need to form the "free-hand scribbles" of the
ink annotation (x1, y1,
x2, y2, x3,
y3 ... xn, yn)flags
- flag
or combined
value of flags representing characteristics of the
annotation
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfInkAnnot(PdfRect r, int flags, Color c) throws IOException, PdfException
PdfInkAnnot(double[], int, Color)
.
public PdfInkAnnot(double[] vertices, int flags, Color c) throws IOException, PdfException
vertices
- x- and y-coordinates of the vertices of the lines
that need to form the "free-hand scribble" of the
ink annotation (x1, y1,
x2, y2, x3,
y3 ... xn, yn)flags
- flag
or combined
value of flags representing characteristics of the
annotationc
- color of the "free-hand scribble" and the borders of
the annotation's popup window
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfInkAnnot(double[][] vertices, int flags, Color c) throws IOException, PdfException
vertices
- x- and y-coordinates of the vertices of the lines
that need to form the "free-hand scribbles" of the
ink annotation (x1, y1,
x2, y2, x3,
y3 ... xn, yn)flags
- flag
or combined
value of flags representing characteristics of the
annotationc
- color of the "free-hand scribbles" and the borders
of the annotation's popup window
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfInkAnnot(PdfRect r, Color c) throws IOException, PdfException
PdfInkAnnot(double[], Color)
.
public PdfInkAnnot(double[] vertices, Color c) throws IOException, PdfException
vertices
- x- and y-coordinates of the vertices of the lines
that need to form the "free-hand scribble" of the
ink annotation (x1, y1,
x2, y2, x3,
y3 ... xn, yn)c
- color of the "free-hand scribble" and the borders of
the annotation's popup window
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfInkAnnot(double[][] vertices, Color c) throws IOException, PdfException
vertices
- x- and y-coordinates of the vertices of the lines
that need to form the "free-hand scribbles" of the
ink annotation (x1, y1,
x2, y2, x3,
y3 ... xn, yn)c
- color of the "free-hand scribblel" and the borders
of the annotation's popup window
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.Method Detail |
public double[][] getVertices()
setVertices(double[][])
public void setVertices(double[][] vertices)
vertices
- x- and y-coordinates of the vertices of the
scribbles
(x1, y1, x2,
y2, x3, y3
... xn, yn)getVertices()
public void setVertices(double[] vertices)
vertices
- x- and y-coordinates of the vertices
(x1, y1, x2,
y2, x3, y3 ...
xn, yn)getVertices()
public void setVertices(double[][] vertices, int measurementUnit) throws PdfException
vertices
- x- and y-coordinates of the vertices of the
scribbles (x1, y1,
x2, y2,
x3, y3
... xn, yn)measurementUnit
- constant specifying the measurement unit
PdfException
- if an illegal argument is supplied.PdfMeasurement
,
getVertices()
public void setTransparency(float transparecyLevel)
public float getTransparency()
public void setVertices(double[] vertices, int measurementUnit)
vertices
- x- and y-coordinates of the vertices
(x1, y1, x2,
y2, x3, y3 ...
xn, yn)measurementUnit
- constant specifying the measurement unitpublic Object clone()
public void setRect(double x, double y, double width, double height)
PdfAnnot
x
, y
)
with specified width and height.
The position (x
, y
), and dimensions
width
and height
are applied in the
default measurement unit of the page to which the annotation
is added.
setRect
in class PdfAnnot
x
- x-coordinate of the annotation rectangley
- y-coordinate of the annotation rectanglewidth
- width of the annotation rectangleheight
- height of the annotation rectanglePdfAnnot.getRect()
public void setRect(double x, double y, double width, double height, int mu)
PdfAnnot
setRect
in class PdfAnnot
x
- x-coordinate of the annotation rectangley
- y-coordinate of the annotation rectanglewidth
- width of the annotation rectangleheight
- height of the annotation rectanglemu
- measurement unit with which the annotation rectangle
is specifiedPdfAnnot.getRect()
public void setRect(PdfRect r)
PdfAnnot
PdfRect
object as
annotation rectangle
for this annotation.
The position and size of the rectangle are applied in the default measurement unit of the page to which the annotation is added.
setRect
in class PdfAnnot
r
- annotation rectangle for this annotationPdfAnnot.getRect()
public void setRect(PdfRect r, int mu)
PdfAnnot
PdfRect
object as
annotation rectangle for this annotation in specified
measurement unit.
setRect
in class PdfAnnot
r
- annotation rectangle for this annotationmu
- measurement unit with which the annotation rectangle
is specifiedPdfAnnot.getRect()
public void setRect(Rectangle r)
PdfAnnot
Rectangle
object as
annotation rectangle for this annotation.
setRect
in class PdfAnnot
r
- annotation rectangle for this annotationPdfAnnot.getRect()
public PdfPopUpAnnot getPopup()
public void setPopup(PdfPopUpAnnot popup, boolean overridePopUpProperties)
popup
- popup annotation that needs to be used as the popup
windowoverridePopUpProperties
- whether a viewer application should override the
properties of the popup annotation with those of
this annotationPdfProAnnot.getPopup()
public PdfAppearanceStream getDownAppearance()
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
,
PdfProAnnot.setDownAppearance(PdfAppearanceStream)
public void setDownAppearance(PdfAppearanceStream downAppearance)
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.getRolloverAppearance()
,
PdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
public PdfAppearanceStream getNormalAppearance()
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.getRolloverAppearance()
,
PdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setDownAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
public void setNormalAppearance(PdfAppearanceStream normalAppearance)
normalAppearance
- the specified appearance streamPdfProAnnot.setDownAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
,
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.getRolloverAppearance()
public PdfAppearanceStream getRolloverAppearance()
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setDownAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
public void setRolloverAppearance(PdfAppearanceStream rolloverAppearance)
rolloverAppearance
- the specified appearance streamPdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setDownAppearance(PdfAppearanceStream)
,
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.getRolloverAppearance()
|
Pro. Ed. v5.0.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |