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
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
ConstructorsModifierConstructorDescriptionprotectedPDAnnotationSquareCircle(String subType) Creates a Circle or Square annotation of the specified sub type.protectedConstructor. -
Method Summary
Modifier and TypeMethodDescriptionabstract voidCreate the appearance entry for this annotation.This will retrieve the border effect dictionary, specifying effects to be applied used in drawing the line.This will retrieve the interior color of the drawn area color is in DeviceRGB color space.This will get the rectangle difference rectangle.float[]This will get the differences between the annotations "outer" rectangle defined by /Rect and the border.voidThis will set the border effect dictionary, specifying effects to be applied when drawing the line.voidThis will set interior color of the drawn area color is in DeviceRGB colorspace.voidThis 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, setTitlePopupMethods 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 Details
-
PDAnnotationSquareCircle
Creates a Circle or Square annotation of the specified sub type.- Parameters:
subType- the subtype the annotation represents.
-
PDAnnotationSquareCircle
Constructor.- Parameters:
dict- The annotations dictionary.
-
-
Method Details
-
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
This will set interior color of the drawn area color is in DeviceRGB colorspace.- Parameters:
ic- color in the DeviceRGB color space.
-
getInteriorColor
This will retrieve the interior color of the drawn area color is in DeviceRGB color space.- Returns:
- object representing the color.
-
setBorderEffect
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
This will retrieve the border effect dictionary, specifying effects to be applied used in drawing the line.- Returns:
- The border effect dictionary
-
setRectDifference
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
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.
-