|
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.PdfCaretAnnot
This class represents a caret annotation. Caret annotations are identified by a caret (^) symbol and are typically used to visually indicate the presence of a text edit.
// 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("Caret Annotation", fontHelvetica, 80, 120); page.writeText("Caret annotation displays the" + " missing information in the popup window.", fontHelvetica, 120, 150); // Create a caret annotation and set its properties PdfCaretAnnot caretAnnot = new PdfCaretAnnot(new PdfRect(367, 165, 8, 10), Color.red); caretAnnot.setTitle("Title"); caretAnnot.setContents("This is a Caret Annotation"); caretAnnot.setSubject("Annotation Subject"); caretAnnot.setSymbol(PdfCaretAnnot.SYMBOL_PARAGRAPH); // Add the caret annotation to the page page.addAnnotation(caretAnnot);
Field Summary | |
static int |
SYMBOL_NONE
Constant specifying no associate symbol for the caret. |
static int |
SYMBOL_PARAGRAPH
Constant specifying a "new paragraph" symbol (¶) for the caret. |
Constructor Summary | |
PdfCaretAnnot()
Zero-argument default constructor. |
|
PdfCaretAnnot(PdfRect r,
Color c)
Constructs a caret annotation with specified rectangle and color. |
|
PdfCaretAnnot(PdfRect r,
int flags)
Constructs a caret annotation with specified rectangle and flags. |
|
PdfCaretAnnot(PdfRect r,
int flags,
Color c)
Constructs a caret annotation with specified rectangle, flags, and color. |
|
PdfCaretAnnot(PdfRect r,
String subject,
String contents,
String title)
Constructs a caret annotation with specified rectangle, and popup window subject, conent and title. |
|
PdfCaretAnnot(PdfRect r,
String subject,
String contents,
String title,
Color c)
Constructs a caret annotation with specified rectangle, popup window subject, conent and title, and color. |
|
PdfCaretAnnot(PdfRect r,
String subject,
String contents,
String title,
int flags)
Constructs a caret annotation with specified rectangle, popup window subject, conent and title, flags, color, and associated symbol. |
|
PdfCaretAnnot(PdfRect r,
String subject,
String contents,
String title,
int flags,
Color c)
Constructs a caret annotation with specified rectangle, popup window subject, conent and title, flags, and color. |
|
PdfCaretAnnot(PdfRect r,
String subject,
String contents,
String title,
int flags,
Color c,
int symbol)
Constructs a caret annotation with specified rectangle, popup window subject, conent and title, flags, color, and associated symbol. |
Method Summary | |
Object |
clone()
|
double |
getBottomRD()
Returns distance between the bottom edge of the caret and the bottom edge of the annotation rectangle. |
PdfRect |
getDiffRect()
Returns rectangle of the caret inside the annotation rectangle. |
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. |
double |
getLeftRD()
Returns distance between the left edge of the caret and the left edge of the annotation rectangle. |
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. |
double |
getRightRD()
Returns distance between the right edge of the caret and the right edge of the annotation rectangle. |
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). |
int |
getSymbol()
Returns constant for any symbol associated with the caret annotation. |
double |
getTopRD()
Returns distance between the top edge of the caret and the top edge of the annotation rectangle. |
float |
getTransparency()
|
void |
setBottomRD(float bottomRD)
Specifies distance between the bottom edge of the caret and the bottom edge of the annotation rectangle. |
void |
setDiffRect(PdfRect diffRect)
Specifies a rectangle for the caret inside the annotation rectangle. |
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 |
setLeftRD(float leftRD)
Specifies distance between the left edge of the caret and the left edge of the annotation rectangle. |
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 |
setRightRD(float rightRD)
Specifies distance between the right edge of the caret and the right edge of the annotation rectangle. |
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 |
setSymbol(int symbol)
Specifies a symbol that needs to be associated with caret. |
void |
setTopRD(float topRD)
Specifies distance between the top edge of the caret and the top edge of the annotation rectangle. |
void |
setTransparency(float transparecyLevel)
|
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, setRect, setRect, setRect, setRect, setRect, setShowRect, setSubject, setTitle |
Methods inherited from class java.lang.Object |
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SYMBOL_NONE
public static final int SYMBOL_PARAGRAPH
Constructor Detail |
public PdfCaretAnnot()
public PdfCaretAnnot(PdfRect r, String subject, String contents, String title, int flags, Color c, int symbol) throws IOException, PdfException
r
- annotation rectangle - 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
c
- color of the caretsymbol
- constant
for any associate
symbol
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfCaretAnnot(PdfRect r, String subject, String contents, String title) throws IOException, PdfException
r
- annotation rectangle - 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 annotation
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfCaretAnnot(PdfRect r, String subject, String contents, String title, Color c) throws IOException, PdfException
r
- annotation rectangle - 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 annotationc
- color of the caret
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfCaretAnnot(PdfRect r, String subject, String contents, String title, int flags) throws IOException, PdfException
r
- annotation rectangle - 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 PdfCaretAnnot(PdfRect r, String subject, String contents, String title, int flags, Color c) throws IOException, PdfException
r
- annotation rectangle - 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
c
- color of the caret
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfCaretAnnot(PdfRect r, int flags) throws IOException, PdfException
r
- annotation rectangle - 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 PdfCaretAnnot(PdfRect r, int flags, Color c) throws IOException, PdfException
r
- annotation rectangle (rectangular area on a page
where the annotation is located)flags
- annotation attributes
c
- color of the caret
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfCaretAnnot(PdfRect r, Color c) throws IOException, PdfException
r
- annotation rectangle - rectangular area on a page
where the annotation is locatedc
- color of the caret
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.Method Detail |
public Object clone()
public int getSymbol()
setSymbol(int)
public void setSymbol(int symbol)
SYMBOL_NONE
.
symbol
- constant for a symbol associated with caretgetSymbol()
,
SYMBOL_PARAGRAPH
public PdfRect getDiffRect()
setDiffRect(PdfRect)
public void setDiffRect(PdfRect diffRect)
associated symbol
is
{set
for the annotation.
diffRect
- a rectangle for the caret inside the annotation
rectanglegetDiffRect()
public double getBottomRD()
setBottomRD(float)
public void setBottomRD(float bottomRD)
bottomRD
- distance between the bottom edge of the caret and
the bottom edge of the annotation rectanglegetBottomRD()
public double getLeftRD()
setLeftRD(float)
public void setLeftRD(float leftRD)
leftRD
- distance between the left edge of the caret and the
left edge of the annotation rectanglegetLeftRD()
public double getRightRD()
setRightRD(float)
public void setRightRD(float rightRD)
rightRD
- distance between the right edge of the caret and the
right edge of the annotation rectangle.getRightRD()
public double getTopRD()
setTopRD(float)
public void setTopRD(float topRD)
topRD
- distance between the top edge of the caret and the
top edge of the annotation rectangle.getTopRD()
public void setTransparency(float transparecyLevel)
public float getTransparency()
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 |