|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.faceless.pdf2.PDFObject
org.faceless.pdf2.PDFMap
org.faceless.pdf2.PDFAnnotation
org.faceless.pdf2.AnnotationNote
This class represents the type of PDFAnnotation
created by the
"Note Tool" in Acrobat. This is normally represented by an icon on screen
until the user clicks on it, at which point a window pops up and displays
the contents.
Constructor Summary | |
AnnotationNote()
Create a new Note of the default type - a yellow "Note". |
Method Summary | |
String |
getAuthor()
Return the author (or "Label") of the annotation |
String |
getContents()
Return the contents of the notes' pop-up window, as set by setContents(java.lang.String) |
float[] |
getRectangle()
Return the rectangle this annotation applies to on the page, or null if no rectangle applies for this type of annotation. |
String |
getType()
Returns the type of Note. |
boolean |
isOpen()
Return whether this Note is open by default |
void |
setAuthor(String label)
Set the author of the annotation. |
void |
setContents(String contents)
Set the contents pop-up window displayed when the annotation is open. |
void |
setOpen(boolean open)
Set whether this Note is saved in it's opened or closed state. |
void |
setRectangle(float x1,
float y1,
float x2,
float y2)
Set the rectangle for the annotation. |
void |
setType(String type,
Color color)
Set the type of the note, which affects the type of icon thats used to display it. |
Methods inherited from class org.faceless.pdf2.PDFAnnotation |
equals, getCreationDate, getInReplyTo, getModifyDate, getPage, getSubject, getUniqueID, isPrintable, isReadOnly, isVisible, setInReplyTo, setPage, setPrintable, setReadOnly, setSubject, setUniqueID, setVisible, toString |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AnnotationNote()
Method Detail |
public void setType(String type, Color color)
All of these types will work in Acrobat 4.x and later, although attempting to edit the annotation type of an Acrobat 6.x annotation in an earlier release will probably result in the icon reverting to the original "Note" icon.
public String getType()
getType
in class PDFAnnotation
public void setRectangle(float x1, float y1, float x2, float y2)
PDFAnnotation
AnnotationLink
and AnnotationStamp
annotations, this is
the rectangle containing the hyperlink area or stamp.AnnotationNote
annotations, this is the rectangle describing the popup
window when it's opened. When it's closed, the icon is positioned at x1,y1.
Note that all co-ordinates are in absolute page co-ordinates.
This means they are measured in points from the bottom-left hand
corner of the page, regardless of any calls to PDFPage.rotate(float, float, double)
or PDFPage.setUnits(float, int)
that have been made. This restriction is
part of the PDF specification.
setRectangle
in class PDFAnnotation
x1
- the X co-ordinate of the bottom-left corner of the rectangley1
- the Y co-ordinate of the bottom-left corner of the rectanglex2
- the X co-ordinate of the top-right corner of the rectangley2
- the Y co-ordinate of the top-right corner of the rectanglepublic float[] getRectangle()
PDFAnnotation
setRectangle()
method for a discussion on units.
getRectangle
in class PDFAnnotation
PDFAnnotation.setRectangle(float, float, float, float)
public void setAuthor(String label)
public String getAuthor()
public void setContents(String contents)
contents
- the contents of the window - may contain newline and non-ASCII
Unicode characters.public String getContents()
setContents(java.lang.String)
public void setOpen(boolean open)
public boolean isOpen()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |