|
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.PdfPolylineAnnot
com.gnostice.pdfone.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. |
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. |
Methods inherited from class com.gnostice.pdfone.PdfPolylineAnnot |
getDownAppearance, getInteriorColor, getLineEndStyle, getLineStartStyle, getNormalAppearance, getPopup, getRolloverAppearance, getTransparency, getVertices, setDownAppearance, setInteriorColor, setLineEndStyle, setLineStartStyle, setNormalAppearance, setPopup, setRect, setRect, setRect, setRect, setRect, setRolloverAppearance, 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)
.
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)
.
public PdfPolygonAnnot(double[] vertices, String subject, String contents, String title) throws IOException, PdfException
public PdfPolygonAnnot(PdfRect r, String subject, String contents, String title, Color c) throws IOException, PdfException
PdfPolygonAnnot(double[], String, String, String, Color)
.
public PdfPolygonAnnot(double[] vertices, String subject, String contents, String title, Color c) throws IOException, PdfException
public PdfPolygonAnnot(PdfRect r, String subject, String contents, String title, int flags) throws IOException, PdfException
PdfPolygonAnnot(double[], String, String, String, int)
.
public PdfPolygonAnnot(double[] vertices, String subject, String contents, String title, int flags) throws 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)
.
public PdfPolygonAnnot(double[] vertices, String subject, String contents, String title, int flags, Color c) throws IOException, PdfException
public PdfPolygonAnnot(PdfRect r, int flags) throws IOException, PdfException
PdfPolygonAnnot(double[], int)
.
public PdfPolygonAnnot(double[] vertices, int flags) throws IOException, PdfException
public PdfPolygonAnnot(PdfRect r, int flags, Color c) throws IOException, PdfException
PdfPolygonAnnot(double[], int, Color)
.
public PdfPolygonAnnot(double[] vertices, int flags, Color c) throws IOException, PdfException
public PdfPolygonAnnot(PdfRect r, Color c) throws IOException, PdfException
PdfPolygonAnnot(double[], Color)
.
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)
|
Pro. Ed. v5.0.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |