Package org.apache.pdfbox.pdmodel.fdf
Class FDFAnnotationLine
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.fdf.FDFAnnotation
-
- org.apache.pdfbox.pdmodel.fdf.FDFAnnotationLine
-
- All Implemented Interfaces:
COSObjectable
public class FDFAnnotationLine extends FDFAnnotation
This represents a Line FDF annotation.- Author:
- Ben Litchfield, Johanneke Lamberink
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSUBTYPECOS Model value for SubType entry.-
Fields inherited from class org.apache.pdfbox.pdmodel.fdf.FDFAnnotation
annot
-
-
Constructor Summary
Constructors Constructor Description FDFAnnotationLine()Default constructor.FDFAnnotationLine(COSDictionary a)Constructor.FDFAnnotationLine(org.w3c.dom.Element element)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetCaption()This will retrieve if the contents are shown as a caption or not.floatgetCaptionHorizontalOffset()This will retrieve the horizontal offset of the caption.java.lang.StringgetCaptionStyle()This will retrieve the caption positioning.floatgetCaptionVerticalOffset()This will retrieve the vertical offset of the caption.java.lang.StringgetEndPointEndingStyle()This will retrieve the line ending style for the end point, possible values shown in the LE_ constants section.java.awt.ColorgetInteriorColor()This will retrieve the interior color of the line endings defined in the LE entry.floatgetLeaderExtend()This will retrieve the length of the leader line extensions.floatgetLeaderLength()This will retrieve the length of the leader line.floatgetLeaderOffset()This will retrieve the length of the leader line offset.float[]getLine()This will retrieve the start and end coordinates of the line (or leader line if LL entry is set).java.lang.StringgetStartPointEndingStyle()This will retrieve the line ending style for the start point, possible values shown in the LE_ constants section.voidsetCaption(boolean cap)This will set if the contents are shown as a caption to the line.voidsetCaptionHorizontalOffset(float offset)This will set the horizontal offset of the caption.voidsetCaptionStyle(java.lang.String captionStyle)This will set the caption positioning.voidsetCaptionVerticalOffset(float offset)This will set the vertical offset of the caption.voidsetEndPointEndingStyle(java.lang.String style)This will set the line ending style for the end point, see the LE_ constants for the possible values.voidsetInteriorColor(java.awt.Color color)This will set interior color of the line endings defined in the LE entry.voidsetLeaderExtend(float leaderExtend)This will set the length of the leader line extensions.voidsetLeaderLength(float leaderLength)This will set the length of the leader line.voidsetLeaderOffset(float leaderOffset)This will set the length of the leader line offset.voidsetLine(float[] line)This will set start and end coordinates of the line (or leader line if LL entry is set).voidsetStartPointEndingStyle(java.lang.String style)This will set the line ending style for the start point, see the LE_ constants for the possible values.-
Methods inherited from class org.apache.pdfbox.pdmodel.fdf.FDFAnnotation
create, getBorderEffect, getBorderStyle, getColor, getContents, getCOSObject, getCreationDate, getDate, getIntent, getName, getOpacity, getPage, getRectangle, getRichContents, getStringOrStream, getSubject, getTitle, isHidden, isInvisible, isLocked, isLockedContents, isNoRotate, isNoView, isNoZoom, isPrinted, isReadOnly, isToggleNoView, setBorderEffect, setBorderStyle, setColor, setContents, setCreationDate, setDate, setHidden, setIntent, setInvisible, setLocked, setLockedContents, setName, setNoRotate, setNoView, setNoZoom, setOpacity, setPage, setPrinted, setReadOnly, setRectangle, setRichContents, setSubject, setTitle, setToggleNoView
-
-
-
-
Field Detail
-
SUBTYPE
public static final java.lang.String SUBTYPE
COS Model value for SubType entry.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FDFAnnotationLine
public FDFAnnotationLine()
Default constructor.
-
FDFAnnotationLine
public FDFAnnotationLine(COSDictionary a)
Constructor.- Parameters:
a- An existing FDF Annotation.
-
FDFAnnotationLine
public FDFAnnotationLine(org.w3c.dom.Element element) throws java.io.IOExceptionConstructor.- Parameters:
element- An XFDF element.- Throws:
java.io.IOException- If there is an error extracting information from the element.
-
-
Method Detail
-
setLine
public void setLine(float[] line)
This will set start and end coordinates of the line (or leader line if LL entry is set).- Parameters:
line- array of 4 floats [x1, y1, x2, y2] line start and end points in default user space.
-
getLine
public float[] getLine()
This will retrieve the start and end coordinates of the line (or leader line if LL entry is set).- Returns:
- array of floats [x1, y1, x2, y2] line start and end points in default user space.
-
setStartPointEndingStyle
public void setStartPointEndingStyle(java.lang.String style)
This will set the line ending style for the start point, see the LE_ constants for the possible values.- Parameters:
style- The new style.
-
getStartPointEndingStyle
public java.lang.String getStartPointEndingStyle()
This will retrieve the line ending style for the start point, possible values shown in the LE_ constants section.- Returns:
- The ending style for the start point.
-
setEndPointEndingStyle
public void setEndPointEndingStyle(java.lang.String style)
This will set the line ending style for the end point, see the LE_ constants for the possible values.- Parameters:
style- The new style.
-
getEndPointEndingStyle
public java.lang.String getEndPointEndingStyle()
This will retrieve the line ending style for the end point, possible values shown in the LE_ constants section.- Returns:
- The ending style for the end point.
-
setInteriorColor
public void setInteriorColor(java.awt.Color color)
This will set interior color of the line endings defined in the LE entry.- Parameters:
color- The interior color of the line endings.
-
getInteriorColor
public java.awt.Color getInteriorColor()
This will retrieve the interior color of the line endings defined in the LE entry.- Returns:
- object representing the color.
-
setCaption
public void setCaption(boolean cap)
This will set if the contents are shown as a caption to the line.- Parameters:
cap- Boolean value.
-
getCaption
public boolean getCaption()
This will retrieve if the contents are shown as a caption or not.- Returns:
- boolean if the content is shown as a caption.
-
getLeaderLength
public float getLeaderLength()
This will retrieve the length of the leader line.- Returns:
- the length of the leader line
-
setLeaderLength
public void setLeaderLength(float leaderLength)
This will set the length of the leader line.- Parameters:
leaderLength- length of the leader line
-
getLeaderExtend
public float getLeaderExtend()
This will retrieve the length of the leader line extensions.- Returns:
- the length of the leader line extensions
-
setLeaderExtend
public void setLeaderExtend(float leaderExtend)
This will set the length of the leader line extensions.- Parameters:
leaderExtend- length of the leader line extensions
-
getLeaderOffset
public float getLeaderOffset()
This will retrieve the length of the leader line offset.- Returns:
- the length of the leader line offset
-
setLeaderOffset
public void setLeaderOffset(float leaderOffset)
This will set the length of the leader line offset.- Parameters:
leaderOffset- length of the leader line offset
-
getCaptionStyle
public java.lang.String getCaptionStyle()
This will retrieve the caption positioning.- Returns:
- the caption positioning
-
setCaptionStyle
public void setCaptionStyle(java.lang.String captionStyle)
This will set the caption positioning. Allowed values are: "Inline" and "Top"- Parameters:
captionStyle- caption positioning
-
setCaptionHorizontalOffset
public void setCaptionHorizontalOffset(float offset)
This will set the horizontal offset of the caption.- Parameters:
offset- the horizontal offset of the caption
-
getCaptionHorizontalOffset
public float getCaptionHorizontalOffset()
This will retrieve the horizontal offset of the caption.- Returns:
- the horizontal offset of the caption
-
setCaptionVerticalOffset
public void setCaptionVerticalOffset(float offset)
This will set the vertical offset of the caption.- Parameters:
offset- vertical offset of the caption
-
getCaptionVerticalOffset
public float getCaptionVerticalOffset()
This will retrieve the vertical offset of the caption.- Returns:
- the vertical offset of the caption
-
-