Class PDAnnotationSquareCircle
- java.lang.Object
-
- com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotation
-
- com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
-
- com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotationSquareCircle
-
- All Implemented Interfaces:
COSObjectable
public class PDAnnotationSquareCircle extends PDAnnotationMarkup
This is the class that represents a rectangular or eliptical annotation Introduced in PDF 1.3 specification .
-
-
Field Summary
Fields Modifier and Type Field Description static StringSUB_TYPE_CIRCLEConstant for an Eliptical type of annotation.static StringSUB_TYPE_SQUAREConstant for a Rectangular type of annotation.-
Fields inherited from class com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
RT_GROUP, RT_REPLY, SUB_TYPE_CARET, SUB_TYPE_FREETEXT, SUB_TYPE_INK, SUB_TYPE_POLYGON, SUB_TYPE_POLYLINE, SUB_TYPE_SOUND
-
-
Constructor Summary
Constructors Constructor Description PDAnnotationSquareCircle(COSDictionary field)Creates a Line annotation from a COSDictionary, expected to be a correct object definition.PDAnnotationSquareCircle(String subType)Creates a Circle or Square annotation of the specified sub type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PDBorderEffectDictionarygetBorderEffect()This will retrieve the border effect dictionary, specifying effects to be applied used in drawing the line.PDBorderStyleDictionarygetBorderStyle()This will retrieve the border style dictionary, specifying the width and dash pattern used in drawing the line.PDColorgetInteriorColor()This will retrieve the interior color of the drawn area color is in DeviceRGB color space.PDRectanglegetRectDifference()This will get the rectangle difference rectangle.StringgetSubtype()This will retrieve the sub type (and hence appearance, AP taking precedence) For this annotation.voidsetBorderEffect(PDBorderEffectDictionary be)This will set the border effect dictionary, specifying effects to be applied when drawing the line.voidsetBorderStyle(PDBorderStyleDictionary bs)This will set the border style dictionary, specifying the width and dash pattern used in drawing the line.voidsetInteriorColor(PDColor ic)This will set interior color of the drawn area Color is in DeviceRGB colorspace.voidsetRectDifference(PDRectangle rd)This will set the rectangle difference rectangle.voidsetSubtype(String subType)This will set the sub type (and hence appearance, AP taking precedence) For this annotation.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotation
createAnnotation, getAnnotationFlags, getAnnotationName, getAppearance, getAppearanceState, getColor, getColor, getContents, getCOSObject, getModifiedDate, getNormalAppearanceStream, getPage, getRectangle, getStructParent, isHidden, isInvisible, isLocked, isNoRotate, isNoView, isNoZoom, isPrinted, isReadOnly, isToggleNoView, setAnnotationFlags, setAnnotationName, setAppearance, setAppearanceState, setColor, setContents, setHidden, setInvisible, setLocked, setModifiedDate, setNoRotate, setNoView, setNoZoom, setPage, setPrinted, setReadOnly, setRectangle, setStructParent, setToggleNoView
-
Methods inherited from class com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
getConstantOpacity, getCreationDate, getExternalData, getInReplyTo, getIntent, getPopup, getReplyType, getRichContents, getSubject, getTitlePopup, setConstantOpacity, setCreationDate, setExternalData, setInReplyTo, setIntent, setPopup, setReplyType, setRichContents, setSubject, setTitlePopup
-
-
-
-
Field Detail
-
SUB_TYPE_SQUARE
public static final String SUB_TYPE_SQUARE
Constant for a Rectangular type of annotation.- See Also:
- Constant Field Values
-
SUB_TYPE_CIRCLE
public static final String SUB_TYPE_CIRCLE
Constant for an Eliptical type of annotation.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PDAnnotationSquareCircle
public PDAnnotationSquareCircle(String subType)
Creates a Circle or Square annotation of the specified sub type.- Parameters:
subType- the subtype the annotation represents.
-
PDAnnotationSquareCircle
public PDAnnotationSquareCircle(COSDictionary field)
Creates a Line annotation from a COSDictionary, expected to be a correct object definition.- Parameters:
field- the PDF objet to represent as a field.
-
-
Method Detail
-
setInteriorColor
public void setInteriorColor(PDColor ic)
This will set interior color of the drawn area Color is in DeviceRGB colorspace.- Parameters:
ic- color in the DeviceRGB color space.
-
getInteriorColor
public PDColor getInteriorColor()
This will retrieve the interior color of the drawn area color is in DeviceRGB color space.- Returns:
- object representing the color.
-
setBorderEffect
public void setBorderEffect(PDBorderEffectDictionary be)
This will set the border effect dictionary, specifying effects to be applied when drawing the line.- Parameters:
be- The border effect dictionary to set.
-
getBorderEffect
public PDBorderEffectDictionary getBorderEffect()
This will retrieve the border effect dictionary, specifying effects to be applied used in drawing the line.- Returns:
- The border effect dictionary
-
setRectDifference
public void setRectDifference(PDRectangle rd)
This will set the rectangle difference rectangle. Giving the difference between the annotations rectangle and where the drawing occurs. (To take account of any effects applied through the BE entry forexample)- Parameters:
rd- the rectangle difference
-
getRectDifference
public PDRectangle getRectDifference()
This will get the rectangle difference rectangle. Giving the difference between the annotations rectangle and where the drawing occurs. (To take account of any effects applied through the BE entry forexample)- Returns:
- the rectangle difference
-
setSubtype
public void setSubtype(String subType)
This will set the sub type (and hence appearance, AP taking precedence) For this annotation. See the SUB_TYPE_XXX constants for valid values.- Parameters:
subType- The subtype of the annotation
-
getSubtype
public String getSubtype()
This will retrieve the sub type (and hence appearance, AP taking precedence) For this annotation.- Overrides:
getSubtypein classPDAnnotation- Returns:
- The subtype of this annotation, see the SUB_TYPE_XXX constants.
-
setBorderStyle
public void setBorderStyle(PDBorderStyleDictionary bs)
This will set the border style dictionary, specifying the width and dash pattern used in drawing the line.- Parameters:
bs- the border style dictionary to set. TODO not all annotations may have a BS entry
-
getBorderStyle
public PDBorderStyleDictionary getBorderStyle()
This will retrieve the border style dictionary, specifying the width and dash pattern used in drawing the line.- Returns:
- the border style dictionary. TODO not all annotations may have a BS entry
-
-