|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.faceless.pdf2.PDFAnnotation
org.faceless.pdf2.AnnotationStamp
public final class AnnotationStamp
A "Rubber-Stamp" annotation, which can also contain a longer message in
an associated pop-up window. A number of predefined rubber stamps exist,
or for custom stamps they can be created from a PDFCanvas object.
For example, to add a rubber stamp to page, try something like this:
AnnotationStamp stamp = new AnnotationStamp("stamp.standard.Approved", 1);
float x = page.getWidth()/2;
float y = page.getHeight()/2;
float w = stamp.getRecommendedWidth();
float h = stamp.getRecommendedHeight();
stamp.setRectangle(x-(w/2), y-(h/2), x+(w/2), y+(h/2));
page.addAnnotation(stamp);
| Constructor Summary | |
|---|---|
AnnotationStamp(String type,
float opacity)
Create a rubber-stamp annotation which can be added to the page. |
|
AnnotationStamp(String name,
PDFCanvas canvas)
Create a new Stamp from the specified canvas |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
float |
getRecommendedHeight()
Return the recommended height of this stamp |
float |
getRecommendedWidth()
Return the recommended width of this stamp |
String |
getType()
Returns the type of Stamp used. |
String |
toString()
|
| Methods inherited from class org.faceless.pdf2.PDFAnnotation |
|---|
addReview, getAuthor, getColor, getContents, getCreationDate, getInReplyTo, getModifyDate, getOpacity, getPage, getPopup, getRectangle, getReplies, getReviews, getSubject, getUniqueID, isPrintable, isReadOnly, isVisible, setAuthor, setColor, setContents, setCreationDate, setInReplyTo, setModifyDate, setOpacity, setPage, setPrintable, setReadOnly, setRectangle, setSubject, setUniqueID, setVisible |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationStamp(String type,
float opacity)
| stamp.stencil.Approved | The word "Approved" in a rubber-stamp style |
|---|---|
| stamp.stencil.AsIs | The words "As Is" in a rubber-stamp style |
| stamp.stencil.Confidential | The word "Confidential" in a rubber-stamp style |
| stamp.stencil.Departmental | The word "Departmental" in a rubber-stamp style |
| stamp.stencil.Draft | The word "Draft" in a rubber-stamp style |
| stamp.stencil.Experimental | The word "Experimental" in a rubber-stamp style |
| stamp.stencil.Expired | The word "Expired" in a rubber-stamp style |
| stamp.stencil.Final | The word "Final" in a rubber-stamp style |
| stamp.stencil.ForComment | The words "For Comment" in a rubber-stamp style |
| stamp.stencil.ForPublicRelease | The words "For Public Release" in a rubber-stamp style |
| stamp.stencil.NotApproved | The words "Not Approved" in a rubber-stamp style |
| stamp.stencil.NotForPublicRelease | The words "Not For Public Release" in a rubber-stamp style |
| stamp.stencil.Sold | The words "As Is" in a rubber-stamp style |
| stamp.stencil.TopSecret | The words "Top Secret" in a rubber-stamp style |
| stamp.standard.Approved | The word "Approved" inside a box |
| stamp.standard.Completed | The word "Completed" inside a box |
| stamp.standard.Confidential | The word "Confidential" inside a box |
| stamp.standard.Draft | The word "Draft" inside a box |
| stamp.standard.Final | The word "Final" inside a box |
| stamp.standard.ForComment | The words "For Comment" inside a box |
| stamp.standard.ForPublicRelease | The words "For Public Release" inside a box |
| stamp.standard.InformationOnly | The words "Information Only" inside a box |
| stamp.standard.NotApproved | The words "Not Approved" inside a box |
| stamp.standard.NotForPublicRelease | The words "Not For Public Release" inside a box |
| stamp.standard.PreliminaryResults | The words "Preliminary Results" inside a box |
| stamp.standard.Void | The word "Void" inside a box |
PDFCanvas.PDFCanvas(String,float) constructor,
the resource file should define the "name" property, which is the name of
the stamp.
type - the type of stamp - one of the values listed above or the name of a resource fileopacity - the opacity of the stamp - anywhere between 0 (for transparent) and 1 (for opaque).
Note that transparency was only added in Acrobat 5, so earlier viewers will ignore this setting.
IllegalArgumentException - if the stamp type is unknown
public AnnotationStamp(String name,
PDFCanvas canvas)
name - the name of the stampcanvas - the canvas to use as the body of the stamp| Method Detail |
|---|
public String getType()
getType in class PDFAnnotationpublic float getRecommendedWidth()
public float getRecommendedHeight()
public String toString()
public boolean equals(Object o)
equals in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||