Class PDAnnotationSquareCircle
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation
-
- org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
-
- org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationSquareCircle
-
- All Implemented Interfaces:
COSObjectable
- Direct Known Subclasses:
PDAnnotationCircle,PDAnnotationSquare
public abstract class PDAnnotationSquareCircle extends PDAnnotationMarkup
This is the class that represents a rectangular or elliptical annotation introduced in PDF 1.3 specification .
-
-
Field Summary
-
Fields inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
RT_GROUP, RT_REPLY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPDAnnotationSquareCircle(java.lang.String subType)Creates a Circle or Square annotation of the specified sub type.protectedPDAnnotationSquareCircle(COSDictionary dict)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidconstructAppearances()Create the appearance entry for this annotation.PDBorderEffectDictionarygetBorderEffect()This will retrieve the border effect dictionary, specifying effects to be applied 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.float[]getRectDifferences()This will get the differences between the annotations "outer" rectangle defined by /Rect and the border.voidsetBorderEffect(PDBorderEffectDictionary be)This will set the border effect dictionary, specifying effects to be applied when 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.voidsetRectDifferences(float difference)This will set the difference between the annotations "outer" rectangle defined by /Rect and the border.voidsetRectDifferences(float differenceLeft, float differenceTop, float differenceRight, float differenceBottom)This will set the difference between the annotations "outer" rectangle defined by /Rect and the border.-
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
getBorderStyle, getConstantOpacity, getCreationDate, getExternalData, getInReplyTo, getIntent, getPopup, getReplyType, getRichContents, getSubject, getTitlePopup, setBorderStyle, setConstantOpacity, setCreationDate, setExternalData, setInReplyTo, setIntent, setPopup, setReplyType, setRichContents, setSubject, setTitlePopup
-
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation
constructAppearances, createAnnotation, equals, getAnnotationFlags, getAnnotationName, getAppearance, getAppearanceState, getBorder, getColor, getColor, getContents, getCOSObject, getModifiedDate, getNormalAppearanceStream, getOptionalContent, getPage, getRectangle, getStructParent, getSubtype, hashCode, isHidden, isInvisible, isLocked, isLockedContents, isNoRotate, isNoView, isNoZoom, isPrinted, isReadOnly, isToggleNoView, setAnnotationFlags, setAnnotationName, setAppearance, setAppearanceState, setBorder, setColor, setContents, setHidden, setInvisible, setLocked, setLockedContents, setModifiedDate, setModifiedDate, setNoRotate, setNoView, setNoZoom, setOptionalContent, setPage, setPrinted, setReadOnly, setRectangle, setStructParent, setSubtype, setToggleNoView
-
-
-
-
Constructor Detail
-
PDAnnotationSquareCircle
protected PDAnnotationSquareCircle(java.lang.String subType)
Creates a Circle or Square annotation of the specified sub type.- Parameters:
subType- the subtype the annotation represents.
-
PDAnnotationSquareCircle
protected PDAnnotationSquareCircle(COSDictionary dict)
Constructor.- Parameters:
dict- The annotations dictionary.
-
-
Method Detail
-
constructAppearances
public abstract void constructAppearances()
Description copied from class:PDAnnotationCreate the appearance entry for this annotation. Not having it may prevent display in some viewers. This method is for overriding in subclasses, the default implementation does nothing.- Overrides:
constructAppearancesin classPDAnnotation
-
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. This is supported by PDF 1.5 and higher.- 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 for example)- 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 for example)- Returns:
- the rectangle difference
-
setRectDifferences
public void setRectDifferences(float difference)
This will set the difference between the annotations "outer" rectangle defined by /Rect and the border.This will set an equal difference for all sides
- Parameters:
difference- from the annotations /Rect entry
-
setRectDifferences
public void setRectDifferences(float differenceLeft, float differenceTop, float differenceRight, float differenceBottom)This will set the difference between the annotations "outer" rectangle defined by /Rect and the border.- Parameters:
differenceLeft- left difference from the annotations /Rect entrydifferenceTop- top difference from the annotations /Rect entrydifferenceRight- right difference from the annotations /Rect entrydifferenceBottom- bottom difference from the annotations /Rect entry
-
getRectDifferences
public float[] getRectDifferences()
This will get the differences between the annotations "outer" rectangle defined by /Rect and the border.- Returns:
- the differences. If the entry hasn't been set am empty array is returned.
-
-