public class LineAnnotation extends Annotation
| Constructor and Description |
|---|
LineAnnotation(Page page,
Rect initialRect,
Point startPoint,
Point endPoint)
Create a new LineAnnotation at the end of a page's annotation array.
|
LineAnnotation(Page page,
Rect initialRect,
Point startPoint,
Point endPoint,
int addAfter)
Create a new LineAnnotation at a specific index in the page's annotation array.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete() |
Form |
generateAppearance()
Generate a new appearance stream with the current annotation properties.
|
double |
getAnnotationFeatureLevel()
The minimum PDF version necessary to support the features used in this annotation.
|
java.lang.String |
getBorderStyle() |
java.util.List<java.lang.Double> |
getBorderStyleDashPattern() |
double |
getBorderStyleWidth() |
Point |
getEndPoint()
The ending coordinate of the line, in user space.
|
LineEndingStyle |
getEndPointEndingStyle() |
Point |
getStartPoint()
The starting coordinate of the line, in user space.
|
LineEndingStyle |
getStartPointEndingStyle() |
void |
setAnnotationFeatureLevel(double featureLevel)
Removes features not supported in the supplied version number.
|
void |
setBorderStyle(java.lang.String style) |
void |
setBorderStyleDashPattern(java.util.List<java.lang.Double> dashPattern) |
void |
setBorderStyleWidth(double width) |
void |
setEndPoint(Point endPoint)
The ending coordinate of the line, in user space.
|
void |
setEndPointEndingStyle(LineEndingStyle style) |
void |
setStartPoint(Point startPoint)
The starting coordinate of the line, in user space.
|
void |
setStartPointEndingStyle(LineEndingStyle style) |
equals, getColor, getContents, getFlags, getInteriorColor, getNormalAppearance, getOpacity, getOptionalContentMembershipDict, getPDFDict, getRect, getSubtype, getTitle, hasRichTextData, isCurrentlyVisible, setColor, setContents, setFlags, setInteriorColor, setNormalAppearance, setOpacity, setOptionalContentMembershipDict, setRect, setTitle, toStringpublic LineAnnotation(Page page, Rect initialRect, Point startPoint, Point endPoint)
page - The page to which the LineAnnotation is added.initialRect - A rectangle specifying the annotation's bounds, specified in user space coordinates.startPoint - The starting coordinate of the line, in user space.endPoint - The ending coordinate of the line, in user space.public LineAnnotation(Page page, Rect initialRect, Point startPoint, Point endPoint, int addAfter)
page - The page to which the annotation is added.initialRect - A rectangle specifying the annotation's bounds, specified in user space coordinates.startPoint - The starting coordinate of the line, in user space.endPoint - The ending coordinate of the line, in user space.addAfter - Where to add the annotation in the page's annotation array. To add the annotation to the end of the array, pass a value of -2 or use the alternate version of this constructor that does not take an index (this is generally what you should do unless you have a need to place the annotation at a special location in the array). Passing a value of -1 adds the annotation to the beginning of the array. Passing other negative values produces undefined results.public void delete()
delete in class Annotationpublic Point getStartPoint()
If the line has leader lines, the start point represents the starting point of the leader line rather than the line itself.
public void setStartPoint(Point startPoint)
If the line has leader lines, the start point represents the starting point of the leader line rather than the line itself.
public Point getEndPoint()
If the line has leader lines, the end point represents the ending point of the leader line rather than the line itself.
public void setEndPoint(Point endPoint)
If the line has leader lines, the end point represents the ending point of the leader line rather than the line itself.
public LineEndingStyle getStartPointEndingStyle()
public void setStartPointEndingStyle(LineEndingStyle style)
public LineEndingStyle getEndPointEndingStyle()
public void setEndPointEndingStyle(LineEndingStyle style)
public Form generateAppearance()
The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance.
generateAppearance in class Annotationpublic double getAnnotationFeatureLevel()
getAnnotationFeatureLevel in class Annotationpublic void setAnnotationFeatureLevel(double featureLevel)
setAnnotationFeatureLevel in class Annotationpublic double getBorderStyleWidth()
public void setBorderStyleWidth(double width)
public java.lang.String getBorderStyle()
public void setBorderStyle(java.lang.String style)
public java.util.List<java.lang.Double> getBorderStyleDashPattern()
public void setBorderStyleDashPattern(java.util.List<java.lang.Double> dashPattern)