|
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.PdfPolylineAnnot
com.gnostice.pdfone.PdfPolygonAnnot
public class PdfPolygonAnnot
This class represents a polygon annotation. A polygon annotation is
a closed figure made of straight lines. To specify the shape of the
polygon, use the
setVertices()
method inherited from the PdfPolylineAnnot
class. Here is a sample code snippet that shows how to create a polygon annotation.
PdfWriter writer1 = PdfWriter.fileWriter( new File("PdfPolygonAnnot_example.pdf")); PdfDocument doc1 = new PdfDocument(writer1); PdfPage p1 = new PdfPage(); doc1.add(p1); // Define x-y coordinates for the lines forming // the polygons double vertices1[] = { 100, 100, 150, 150, 200, 250, 100, 300 }; double vertices2[] = { 400, 100, 450, 150, 500, 250, 400, 300 }; // Create new polygon annotations PdfPolygonAnnot pa1 = new PdfPolygonAnnot(vertices1, "First annotation subject", "First annotation contents", "First annotation title", PdfAnnot.FLAG_READONLY, Color.BLUE, true, 2); PdfPolygonAnnot pa2 = new PdfPolygonAnnot(vertices2, "Second annotation subject", "Second annotation contents", "Second annotation title", PdfAnnot.FLAG_LOCKED, Color.BLUE, true, 0); // Add the polygons to the document doc1.addAnnotation(pa1, 1); doc1.addAnnotation(pa2, 1); doc1.setOpenAfterSave(true); doc1.write(); writer1.dispose();
Field Summary |
---|
Fields inherited from class com.gnostice.pdfone.PdfPolylineAnnot |
---|
LINEENDSTYLE_BUTT, LINEENDSTYLE_CIRCLE, LINEENDSTYLE_CLOSED_ARROW, LINEENDSTYLE_DIAMOND, LINEENDSTYLE_NONE, LINEENDSTYLE_OPEN_ARROW, LINEENDSTYLE_RCLOSED_ARROW, LINEENDSTYLE_ROPEN_ARROW, LINEENDSTYLE_SLASH, LINEENDSTYLE_SQUARE |
Constructor Summary | |
---|---|
PdfPolygonAnnot()
Zero-argument default constructor. |
|
PdfPolygonAnnot(double[] vertices,
Color c)
Constructs a polygon annotation with specified vertices and color. |
|
PdfPolygonAnnot(double[] vertices,
int flags)
|
|
PdfPolygonAnnot(double[] vertices,
int flags,
Color c)
|
|
PdfPolygonAnnot(double[] vertices,
String subject,
String contents,
String title)
|
|
PdfPolygonAnnot(double[] vertices,
String subject,
String contents,
String title,
Color c)
|
|
PdfPolygonAnnot(double[] vertices,
String subject,
String contents,
String title,
int flags)
|
|
PdfPolygonAnnot(double[] vertices,
String subject,
String contents,
String title,
int flags,
Color c)
|
|
PdfPolygonAnnot(double[] vertices,
String subject,
String contents,
String title,
int flags,
Color c,
boolean isCloudy,
int cloudIntensity)
Constructs a polygon annotation with specified vertices, subject, contents, title, flags, color, annotation attributes, and edge setting. |
|
PdfPolygonAnnot(PdfRect r,
Color c)
Deprecated. Instead, use PdfPolygonAnnot(double[], Color) . |
|
PdfPolygonAnnot(PdfRect r,
int flags)
Deprecated. Instead, use PdfPolygonAnnot(double[], int) . |
|
PdfPolygonAnnot(PdfRect r,
int flags,
Color c)
Deprecated. Instead, use PdfPolygonAnnot(double[], int, Color) . |
|
PdfPolygonAnnot(PdfRect r,
String subject,
String contents,
String title)
Deprecated. Instead, use PdfPolygonAnnot(double[], String, String, String) . |
|
PdfPolygonAnnot(PdfRect r,
String subject,
String contents,
String title,
Color c)
Deprecated. Instead, use PdfPolygonAnnot(double[], String, String, String, Color) . |
|
PdfPolygonAnnot(PdfRect r,
String subject,
String contents,
String title,
int flags)
Deprecated. Instead, use PdfPolygonAnnot(double[], String, String, String, int) . |
|
PdfPolygonAnnot(PdfRect r,
String subject,
String contents,
String title,
int flags,
Color c)
Deprecated. Instead, use PdfPolygonAnnot(PdfRect, String, String, String, int, Color) . |
|
PdfPolygonAnnot(PdfRect r,
String subject,
String contents,
String title,
int flags,
Color c,
boolean isCloudy,
int cloudIntensity)
Deprecated. Instead, use PdfPolygonAnnot(PdfRect, String, String, String, int, Color, boolean, int) . |
Method Summary | |
---|---|
Object |
clone()
|
int |
getCloudIntensity()
Returns value representing the intensity of the "cloudy" effect on edges of the polygon annotation. |
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). |
boolean |
isCloudy()
Returns whether border of the polygon annotation has a "cloudy" effect. |
void |
setCloudIntensity(int cloudIntensity)
Specifies value representing the intensity of the "cloudy" effect on edges of the polygon annotation. |
void |
setCloudy(boolean cloudy)
Specifies whether border of the polygon annotation needs to have a "cloudy" effect. |
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 |
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). |
Methods inherited from class com.gnostice.pdfone.PdfPolylineAnnot |
---|
getInteriorColor, getLineEndStyle, getLineStartStyle, getTransparency, getVertices, setInteriorColor, setLineEndStyle, setLineStartStyle, setRect, setRect, setRect, setRect, setRect, setTransparency, setVertices, setVertices |
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 PdfPolygonAnnot()
public PdfPolygonAnnot(PdfRect r, String subject, String contents, String title, int flags, Color c, boolean isCloudy, int cloudIntensity) throws IOException, PdfException
PdfPolygonAnnot(PdfRect, String, String, String, int, Color, boolean, int)
.
IOException
PdfException
public PdfPolygonAnnot(double[] vertices, String subject, String contents, String title, int flags, Color c, boolean isCloudy, int cloudIntensity) throws IOException, PdfException
vertices
- x-y coordinates of the verticessubject
- text that needs to be displayed in the subject line
of the popup windowcontents
- text that needs to be used as the contents of the
popup windowtitle
- text that needs to displayed as the title of the
popup windowflags
- annotation attributes
c
- color of the polygonisCloudy
- whether the polygon edges needs to have a "cloudy"
effectcloudIntensity
- Values specifying "cloudy" effect of polygon edges -
0 (straight line), 1 (cloudy) and 2 (more cloudy)
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfPolygonAnnot(PdfRect r, String subject, String contents, String title) throws IOException, PdfException
PdfPolygonAnnot(double[], String, String, String)
.
IOException
PdfException
public PdfPolygonAnnot(double[] vertices, String subject, String contents, String title) throws IOException, PdfException
IOException
PdfException
public PdfPolygonAnnot(PdfRect r, String subject, String contents, String title, Color c) throws IOException, PdfException
PdfPolygonAnnot(double[], String, String, String, Color)
.
IOException
PdfException
public PdfPolygonAnnot(double[] vertices, String subject, String contents, String title, Color c) throws IOException, PdfException
IOException
PdfException
public PdfPolygonAnnot(PdfRect r, String subject, String contents, String title, int flags) throws IOException, PdfException
PdfPolygonAnnot(double[], String, String, String, int)
.
IOException
PdfException
public PdfPolygonAnnot(double[] vertices, String subject, String contents, String title, int flags) throws IOException, PdfException
IOException
PdfException
public PdfPolygonAnnot(PdfRect r, String subject, String contents, String title, int flags, Color c) throws IOException, PdfException
PdfPolygonAnnot(PdfRect, String, String, String, int, Color)
.
IOException
PdfException
public PdfPolygonAnnot(double[] vertices, String subject, String contents, String title, int flags, Color c) throws IOException, PdfException
IOException
PdfException
public PdfPolygonAnnot(PdfRect r, int flags) throws IOException, PdfException
PdfPolygonAnnot(double[], int)
.
IOException
PdfException
public PdfPolygonAnnot(double[] vertices, int flags) throws IOException, PdfException
IOException
PdfException
public PdfPolygonAnnot(PdfRect r, int flags, Color c) throws IOException, PdfException
PdfPolygonAnnot(double[], int, Color)
.
IOException
PdfException
public PdfPolygonAnnot(double[] vertices, int flags, Color c) throws IOException, PdfException
IOException
PdfException
public PdfPolygonAnnot(PdfRect r, Color c) throws IOException, PdfException
PdfPolygonAnnot(double[], Color)
.
IOException
PdfException
public PdfPolygonAnnot(double[] vertices, Color c) throws IOException, PdfException
vertices
- x-y coordinates of the verticesc
- color of the polygon
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.Method Detail |
---|
public Object clone()
clone
in class PdfPolylineAnnot
public boolean isCloudy()
true
if border has a "cloudy" effect;
false
if otherwise.setCloudy(boolean)
,
getCloudIntensity()
,
setCloudIntensity(int)
,
PdfPolygonAnnot(PdfRect, String, String, String, int,
Color, boolean, int)
public void setCloudy(boolean cloudy)
cloudy
- true
if border needs to have a
"cloudy" effect; false
if otherwise.isCloudy()
,
getCloudIntensity()
,
setCloudIntensity(int)
,
PdfPolygonAnnot(PdfRect, String, String, String, int,
Color, boolean, int)
public int getCloudIntensity()
setCloudIntensity(int)
,
isCloudy()
,
setCloudy(boolean)
,
PdfPolygonAnnot(PdfRect, String, String, String, int,
Color, boolean, int)
public void setCloudIntensity(int cloudIntensity)
cloudIntensity
- 0 (straight line), 1 (cloudy) and 2 (more cloudy)getCloudIntensity()
,
isCloudy()
,
setCloudy(boolean)
,
PdfPolygonAnnot(PdfRect, String, String, String, int,
Color, boolean, int)
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 annotationgetPopup()
public PdfAppearanceStream getDownAppearance()
getNormalAppearance()
,
getDownAppearance()
,
setNormalAppearance(PdfAppearanceStream)
,
setRolloverAppearance(PdfAppearanceStream)
,
setDownAppearance(PdfAppearanceStream)
public void setDownAppearance(PdfAppearanceStream downAppearance)
getNormalAppearance()
,
getDownAppearance()
,
getRolloverAppearance()
,
setNormalAppearance(PdfAppearanceStream)
,
setRolloverAppearance(PdfAppearanceStream)
public PdfAppearanceStream getNormalAppearance()
getDownAppearance()
,
getRolloverAppearance()
,
setNormalAppearance(PdfAppearanceStream)
,
setDownAppearance(PdfAppearanceStream)
,
setRolloverAppearance(PdfAppearanceStream)
public void setNormalAppearance(PdfAppearanceStream normalAppearance)
normalAppearance
- the specified appearance streamsetDownAppearance(PdfAppearanceStream)
,
setRolloverAppearance(PdfAppearanceStream)
,
getNormalAppearance()
,
getDownAppearance()
,
getRolloverAppearance()
public PdfAppearanceStream getRolloverAppearance()
getNormalAppearance()
,
getDownAppearance()
,
setNormalAppearance(PdfAppearanceStream)
,
setDownAppearance(PdfAppearanceStream)
,
setRolloverAppearance(PdfAppearanceStream)
public void setRolloverAppearance(PdfAppearanceStream rolloverAppearance)
rolloverAppearance
- the specified appearance streamsetNormalAppearance(PdfAppearanceStream)
,
setDownAppearance(PdfAppearanceStream)
,
getNormalAppearance()
,
getDownAppearance()
,
getRolloverAppearance()
|
Pro. Ed. v5.4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |