public final class AnnotationNote extends PDFAnnotation
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 and Description |
---|
AnnotationNote()
Create a new Note of the default type - a yellow "Note".
|
Modifier and Type | Method and Description |
---|---|
float[] |
getClosedRectangle()
Return the Rectangle for this AnnotationNote when it's closed - simply calls
PDFAnnotation.getRectangle() |
float[] |
getOpenRectangle()
Return the Rectangle for this AnnotationNote when it's open
|
String |
getStatus()
For Note annotations that are reviews of other Annotations, get the
status of that review.
|
String |
getType()
Returns the type of Note.
|
boolean |
isOpen()
Return whether this Note is open by default
|
void |
rebuild()
Rebuild the annotation's appearance.
|
void |
setOpen(boolean open)
Set whether this Note is saved in it's opened or closed state.
|
void |
setOpenRectangle(float x1,
float y1,
float x2,
float y2)
Set the Rectangle for this note in its open state.
|
void |
setRectangle(float x1,
float y1,
float x2,
float y2)
Set the rectangle for the annotation - where it is on the page.
|
void |
setStatus(String status)
For Note Annotations that are reviews of other annotations, set
the status of the review.
|
void |
setType(String type,
Color color)
Set the type of the note, which affects the type of icon thats used to
display it.
|
String |
toString() |
addPropertyChangeListener, addReview, flatten, getAuthor, getColor, getContents, getCreationDate, getInReplyTo, getMetaData, getModifyDate, getOpacity, getPage, getPopup, getRectangle, getReplies, getReviews, getSubject, getUniqueID, hasAppearanceState, isContentLocked, isPositionLocked, isPrintable, isReadOnly, isVisible, removePropertyChangeListener, setAuthor, setColor, setContents, setCreationDate, setInReplyTo, setLocked, setMetaData, setModifyDate, setOpacity, setPage, setPrintable, setReadOnly, setSubject, setUniqueID, setVisible
public AnnotationNote()
public void setType(String type, Color color)
Finally in Acrobat 7 the "Circle" type was added. 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, whether this method adjusts the location
of the icon or the popup window depends on whether the annotation is closed or open
at the time of the call to this method. When closed, the icon is positioned at x1,y2
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 void setOpenRectangle(float x1, float y1, float x2, float y2)
Set the Rectangle for this note in its open state.
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.
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[] getOpenRectangle()
public float[] getClosedRectangle()
PDFAnnotation.getRectangle()
public void setOpen(boolean open)
public boolean isOpen()
public void setStatus(String status)
PDFAnnotation.getReviews()
method for more information on reviews.status
- the status to set the note to. Must be one of None, Accepted, Rejected, Cancelled, Completed, Marked or Unmarked. If not an IllegalArgumentException
is thrown.PDFAnnotation.getReviews()
,
getStatus()
public String getStatus()
PDFAnnotation.getReviews()
method
for more information on reviews. For other Note annotations, this will
return null
setStatus(java.lang.String)
method documentation,
or null
if this is not a reviewPDFAnnotation.getReviews()
,
setStatus(java.lang.String)
public void rebuild()
PDFAnnotation
PropertyChangeEvent
) is run on a specific thread.rebuild
in class PDFAnnotation
public String toString()
Copyright © 2001-2017 Big Faceless Organization