|
||||||||||
| 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.AnnotationShape
public class AnnotationShape
Creates an annotation based on the specified Shape. Any type of
shape may be specified - the Annotation will be created as a Square,
Circle, Line, Polygon or PolyLine depending on the type of shape.
Lines and PolyLines may have their endings specified with the setFirstLineEnding(java.lang.String)
and setLastLineEnding(java.lang.String) methods - these are ignored for the other types,
which may be filled, stroked or both depending on the LineColor
and FillColor of the line.
The list of valid line endings is:
| None | No line ending (the default) |
|---|---|
| Square | A Square filled with the annotations fill color, if any |
| Circle | A Circle filled with the annotations fill color, if any |
| Diamond | A Diamond filled with the annotations fill color, if any |
| OpenArrow | Two short lines meeting in an acute angle to form an open arrowhead |
| ClosedArrow | Two short lines meeting in an acute angle as in the OpenArrow style and connected by a third line to form a triangular closed arrowhead filled with the annotation's fill color, if any |
| Butt | A short line at the endpoint perpendicular to the line itself |
| ROpenArrow | Two short lines in the reverse direction from OpenArrow |
| RClosedArrow | A triangular closed arrowhead in the reverse direction from ClosedArrow |
| Slash | A short line at the endpoint approximately 30 degrees clockwise from perpendicular to the line itself |
| Constructor Summary | |
|---|---|
AnnotationShape()
Create a new AnnotationShape. |
|
AnnotationShape(Shape shape)
Create a new AnnotationShape and immediately set its shape by calling setShape() |
|
AnnotationShape(Shape shape,
String end1,
String end2)
Creates a new AnnotationShape and set its shape and line-ending style. |
|
| Method Summary | |
|---|---|
String |
getFirstLineEnding()
Returns the line ending style for the endpoint defined by the first pair of coordinates in the shape. |
String |
getLastLineEnding()
Returns the line ending style for the endpoint defined by the last pair of coordinates in the shape. |
Shape |
getShape()
Returns the shape of this annotation |
PDFStyle |
getStyle()
Returns the style used to draw this shape, as set by setStyle() |
void |
setFirstLineEnding(String le)
Sets the line ending style for the first endpoint. |
void |
setLastLineEnding(String le)
Sets the line ending style for the end of the line. |
void |
setShape(Shape shape)
Set the Shape of this Annotation. |
void |
setStyle(PDFStyle style)
Sets the style used to draw this shape |
String |
toString()
|
| Methods inherited from class org.faceless.pdf2.PDFAnnotation |
|---|
addPropertyChangeListener, addReview, flatten, getAuthor, getColor, getContents, getCreationDate, getInReplyTo, getMetaData, getModifyDate, getOpacity, getPage, getPopup, getRectangle, getReplies, getReviews, getSubject, getType, getUniqueID, hasAppearanceState, isContentLocked, isPositionLocked, isPrintable, isReadOnly, isVisible, removePropertyChangeListener, setAuthor, setColor, setContents, setCreationDate, setInReplyTo, setLocked, setMetaData, setModifyDate, setOpacity, setPage, setPrintable, setReadOnly, setRectangle, setSubject, setUniqueID, setVisible |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationShape()
setShape() method
must be called before any other methods on this object.
public AnnotationShape(Shape shape)
setShape()
shape - the shape of this annotationsetShape(java.awt.Shape)
public AnnotationShape(Shape shape,
String end1,
String end2)
shape - the shape of this annotationend1 - the style for the start of the lineend2 - the style for the end of the linesetShape(java.awt.Shape),
setFirstLineEnding(java.lang.String),
setLastLineEnding(java.lang.String)| Method Detail |
|---|
public void setShape(Shape shape)
annot.setShape(new Line2D.Float(0, 0, 100, 100));Will add a Line annotation at the bottom-left of the page.
shape - the Shapepublic Shape getShape()
public String getFirstLineEnding()
setFirstLineEnding(java.lang.String)public void setFirstLineEnding(String le)
le - the LineEnding for the start of the linegetFirstLineEnding()public String getLastLineEnding()
setLastLineEnding(java.lang.String)public void setLastLineEnding(String le)
le - the LineEnding for the end of the linegetLastLineEnding()public PDFStyle getStyle()
setStyle()
public void setStyle(PDFStyle style)
style - the style to usegetStyle()public String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||