Package com.compdfkit.core.annotation
Class CPDFTextAnnotation
java.lang.Object
com.compdfkit.core.annotation.CPDFAnnotation
com.compdfkit.core.annotation.CPDFTextAnnotation
A note (shown as an icon) on the page.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.compdfkit.core.annotation.CPDFAnnotation
CPDFAnnotation.AppearanceType, CPDFAnnotation.Flags, CPDFAnnotation.PSOAnnotationState, CPDFAnnotation.Type -
Method Summary
Modifier and TypeMethodDescriptionintgetAlpha()Gets opacity.intgetColor()Gets color.Gets annotation content.getRect()Gets annotation rectangle.booleansetAlpha(int alpha) Sets opacity.booleansetColor(int color) Sets color.booleansetContent(String content) Sets annotation content.booleanSets annotation rectangle.booleanupdateAp()Updates annotation appearance.Methods inherited from class com.compdfkit.core.annotation.CPDFAnnotation
addToPage, close, createReplyAnnotation, createReplyStateAnnotation, getCreationDate, getFlags, getMainAnnotNM, getName, getRecentlyModifyDate, getReplies, getState, getTitle, getType, hasAp, isAllowCorrectAnnotationAp, isExitMainAnnot, isHidden, isLocked, isMarkedStateAnnot, isReplyAnnot, isReviewStateAnnot, isValid, removeFromPage, removeFromPageIncludeReplyAnnot, setAllowCorrectAnnotationAp, setCreationDate, setFlags, setHidden, setLocked, setMarkedAnnotState, setName, setRecentlyModifyDate, setReviewAnnotState, setState, setTitle
-
Method Details
-
setContent
Description copied from class:CPDFAnnotationSets annotation content.- Overrides:
setContentin classCPDFAnnotation- Parameters:
content- Annotation content.- Returns:
- Returns whether to successfully set annotation content.
-
getContent
Description copied from class:CPDFAnnotationGets annotation content.- Overrides:
getContentin classCPDFAnnotation- Returns:
- Returns annotation content.
-
setColor
public boolean setColor(int color) Sets color.- Parameters:
color- Color value (0x00000000~0xFFFFFFFF)- Returns:
- Returns whether to successfully set color.
-
getColor
public int getColor()Gets color.- Returns:
- Returns color value (0x00000000~0xFFFFFFFF)
-
setAlpha
public boolean setAlpha(int alpha) Sets opacity.- Parameters:
alpha- Opacity value (0~255)- Returns:
- Returns whether to successfully set opacity.
-
getAlpha
public int getAlpha()Gets opacity.- Returns:
- Returns opacity value (0~255)
-
setRect
Sets annotation rectangle. The page coordinate system has its origin at the left-bottom corner of the page, with the X-axis on the bottom going to the right, and the Y-axis on the left side going up. The device coordinate system is device dependent. For screen device, its origin is at the left-top corner of the window.- Overrides:
setRectin classCPDFAnnotation- Parameters:
rect- Rectangle on the page.- Returns:
- Returns whether to successfully set annotation rectangle.
-
getRect
Gets annotation rectangle. The page coordinate system has its origin at the left-bottom corner of the page, with the X-axis on the bottom going to the right, and the Y-axis on the left side going up. The device coordinate system is device dependent. For screen device, its origin is at the left-top corner of the window.- Overrides:
getRectin classCPDFAnnotation- Returns:
- Returns rectangle on the page.
-
updateAp
public boolean updateAp()Updates annotation appearance. Call this function to update annotation appearance after modifying annotation attribute.- Returns:
- Returns whether to successfully update annotation appearance.
-