|
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.PdfSquareAnnot
This class represents a square annotation. A square annotation can also be rectangular.
// Create a PDF page PdfPage page = new PdfPage(); // Create a PDF font PdfFont fontHelvetica = PdfFont.create("Helvetica", 15, PdfEncodings.WINANSI); fontHelvetica.setColor(Color.BLUE); page.writeText("Square Annotations", fontHelvetica, 80, 560); // Create a square annotation and set its properties PdfSquareAnnot squareAnnot = new PdfSquareAnnot(new PdfRect(100, 600, 100, 60), Color.BLUE); squareAnnot.setSubject("Annotation Subject"); squareAnnot.setContents("This is a Square Annotation."); squareAnnot.setBorderStyle(PdfSquareAnnot.BORDERSTYLE_SOLID); squareAnnot.setBorderWidth(3); squareAnnot.setTitle("Title"); squareAnnot.setColor(Color.BLUE); // Add the square annotation to the page page.addAnnotation(squareAnnot);
PdfAnnot| Field Summary |
| Constructor Summary | |
PdfSquareAnnot()
Zero-argument default constructor. |
|
PdfSquareAnnot(PdfRect r,
Color c)
Creates a new square annotation with specified annotation rectangle and square border color. |
|
PdfSquareAnnot(PdfRect r,
int flags)
Creates a new square annotation with specified annotation rectangle and attributes. |
|
PdfSquareAnnot(PdfRect r,
int flags,
Color c)
Creates a new square annotation with specified annotation rectangle, annotation attributes, and square border color. |
|
PdfSquareAnnot(PdfRect r,
String subject,
String contents,
String title)
Creates a new square annotation with specified annotation rectangle, and popup window subject, content and title. |
|
PdfSquareAnnot(PdfRect r,
String subject,
String contents,
String title,
Color c)
Creates a new square annotation with specified annotation rectangle, popup window subject, content and title, and square border color. |
|
PdfSquareAnnot(PdfRect r,
String subject,
String contents,
String title,
int flags)
Creates a new square annotation with specified annotation rectangle, popup window subject, content and title, and annotation attributes. |
|
PdfSquareAnnot(PdfRect r,
String subject,
String contents,
String title,
int flags,
Color c)
Creates a new square annotation with specified annotation rectangle, popup window subject, content and title, annotation attributes, and square border color. |
|
| Method Summary | |
Object |
clone()
|
int |
getCloudIntensity()
Returns cloud intensity of the border of the square 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. |
Color |
getInteriorColor()
Returns color used to fill the square annotation. |
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 square annotation is cloudy. |
void |
setCloudIntensity(int cloudIntensity)
Sets intensity of the "cloudy" border of the square annotation. |
void |
setCloudy(boolean cloudy)
Specifies whether the border of the square annotation needs to be rendered "cloudy." |
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 |
setInteriorColor(Color interiorColor)
Sets color that needs to be used to fill the square annotation. |
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.PdfAnnot |
getAnnotName, getBorderStyle, getBorderWidth, getBottom, getColor, getContents, getDashPattern, getFlags, getLeft, getRect, getRight, getSubject, getTitle, getTop, getType, hashCode, isShowRect, setAnnotName, setBorderStyle, setBorderWidth, setColor, setContents, setDashPattern, setFlags, setRect, setRect, setRect, setRect, setRect, setShowRect, setSubject, setTitle |
| Methods inherited from class java.lang.Object |
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PdfSquareAnnot()
public PdfSquareAnnot(PdfRect r,
String subject,
String contents,
String title)
throws IOException,
PdfException
r - annotation rectangle - a rectangular area on a page
where the annotation is locatedsubject - text used as subject of the annotationcontents - text used as content of the annotationtitle - text used as title of the annotation
public PdfSquareAnnot(PdfRect r,
String subject,
String contents,
String title,
Color c)
throws IOException,
PdfException
r - annotation rectangle - a rectangular area on a page
where the annotation is locatedsubject - text used as subject of the annotationcontents - text used as content of the annotationtitle - text used as title of the annotationc - color of the square border
IOException - if an I/O error occurs.
PdfException - if an illegal argument is supplied.
public PdfSquareAnnot(PdfRect r,
String subject,
String contents,
String title,
int flags)
throws IOException,
PdfException
r - annotation rectangle - a rectangular area on a page
where the annotation is locatedsubject - text used as subject of the annotationcontents - text used as title of the annotationtitle - text used as title of the annotationflags - annotation attributes
IOException - if an I/O error occurs.
PdfException - if an illegal argument is supplied.
public PdfSquareAnnot(PdfRect r,
String subject,
String contents,
String title,
int flags,
Color c)
throws IOException,
PdfException
r - annotation rectangle - a rectangular area on a page
where the annotation is locatedsubject - text used as subject of the annotationcontents - text used as title of the annotationtitle - text used as title of the annotationflags - annotation attributesc - color of the square border
IOException - if an I/O error occurs.
PdfException - if an illegal argument is supplied.
public PdfSquareAnnot(PdfRect r,
int flags)
throws IOException,
PdfException
r - annotation rectangle - a rectangular area on a page
where the annotation is locatedflags - annotation attributes
IOException - if an I/O error occurs.
PdfException - if an illegal argument is supplied.
public PdfSquareAnnot(PdfRect r,
int flags,
Color c)
throws IOException,
PdfException
r - annotation rectangle - a rectangular area on a page
where the annotation is locatedflags - annotation attributesc - color of the square border
IOException - if an I/O error occurs.
PdfException - if an illegal argument is supplied.
public PdfSquareAnnot(PdfRect r,
Color c)
throws IOException,
PdfException
r - annotation rectangle - a rectangular area on a page
where the annotation is locatedc - color of the square border
IOException - if an I/O error occurs.
PdfException - if an illegal argument is supplied.| Method Detail |
public Object clone()
public int getCloudIntensity()
setCloudIntensity(int cloudIntensity)public void setCloudIntensity(int cloudIntensity)
cloudIntensity - Valid values are 0 (straight line), 1 (cloudy) and 2 (more cloudy).getCloudIntensity(),
setCloudy(boolean)public Color getInteriorColor()
setInteriorColor(Color)public void setInteriorColor(Color interiorColor)
getInteriorColor()public boolean isCloudy()
true if border is cloudy;
false if otherwise.setCloudy(boolean)public void setCloudy(boolean cloudy)
cloudy - if true, border will be rendered "cloudy."setCloudIntensity(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 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()
|
Free |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||