public abstract class CPDFAnnotation
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CPDFAnnotation.AppearanceType |
static class |
CPDFAnnotation.BorderEffectIntensity |
static class |
CPDFAnnotation.CPDFBorderEffectType |
static interface |
CPDFAnnotation.Flags
A set of flags specifying various characteristics of the annotation.
|
static class |
CPDFAnnotation.MarkState |
static class |
CPDFAnnotation.MediaSourceType
Media resource type
|
static class |
CPDFAnnotation.ReviewState |
static class |
CPDFAnnotation.Type
Annotation types
|
Modifier and Type | Field and Description |
---|---|
int |
index |
Modifier and Type | Method and Description |
---|---|
boolean |
addToPage() |
abstract void |
applyAnnotationAttr(CPDFAnnotationUndoAttr annotationAttr) |
void |
close()
When the object is no longer in use, call this method to release resources.
|
CPDFReplyAnnotation |
createReplyAnnotation()
Create a reply annotation.
|
void |
disableListenAttrChanged(boolean recordCurrentStatus)
不监听属性的变化。
CPDFUndoManager 不会记录属性改变时的状态。
一般用于,当需要时时刷新数据,并且改变UI的时候使用。这样防止记录很多无用的数据 |
void |
enableListenAttrChanged()
监听属性的变化。
CPDFUndoManager 会记录属性改变时的状态。 |
boolean |
equal(CPDFAnnotation annotation) |
boolean |
equal(long annotPtr1) |
CPDFReplyAnnotation[] |
getAllReplyAnnotations()
Get all reply annotations to the annotation.
|
abstract CPDFAnnotationUndoAttr |
getAnnotationAttr() |
int |
getAnnotIndexFromNative() |
long |
getAnnotPtr() |
boolean |
getAppearance(android.graphics.Bitmap bitmap)
Gets annotation appearance with Bitmap.
|
boolean |
getAppearanceByPixel(android.graphics.Bitmap bitmap,
CPDFAnnotation.AppearanceType type)
Gets annotation appearance by pixel with Bitmap.
|
int |
getApRotation()
Gets rotation angle of annotation appearance.
|
CPDFAnnotation.BorderEffectIntensity |
getBordEffectIntensity() |
CPDFAnnotation.CPDFBorderEffectType |
getBordEffectType() |
float |
getBorderWidth()
Gets border width of annotation.
|
java.lang.String |
getContent()
Gets annotation content.
|
CPDFDate |
getCreationDate()
Gets the creation date of annotation.
|
int |
getFlags()
Gets annotation flags.
|
CPDFAnnotation.MarkState |
getMarkedAnnotState()
Get the mark state of the reply annotation.
|
java.lang.String |
getName()
Not in use currently
|
CPDFDate |
getRecentlyModifyDate()
Gets the modification date of annotation.
|
android.graphics.RectF |
getRect()
Gets annotation rectangle.
|
CPDFAnnotation.ReviewState |
getReviewAnnotState()
Get the review state of the reply annotation.
|
android.graphics.PointF[] |
getRotateRectPoint() |
int |
getRotation() |
android.graphics.RectF |
getSourceRect() |
java.lang.String |
getTitle()
Not in use currently
|
CPDFAnnotation.Type |
getType()
Gets annotation type, more:
CPDFAnnotation.Type |
android.graphics.PointF[] |
getVertices() |
boolean |
hasAp()
Whether annotation has appearance.
|
boolean |
isAllowCorrectAnnotationAp()
Whether to allow to correct annotation appearance
|
boolean |
isHidden()
This is a convenience property that checks for `CPDFAnnotationFlagHidden` in `flags`.
|
boolean |
isLocked()
This is a convenience property that checks for `CPDFAnnotationFlagLocked` in `flags`.
|
boolean |
isReadOnly()
This is a convenience property that checks for `CPDFAnnotationFlagReadOnly` in `flags`.
|
boolean |
isValid()
Whether annotation object is valid.
|
boolean |
moveAnnotIndex(int annotIndex) |
boolean |
removeAp()
Removes annotation appearance.
|
boolean |
removeFromPage()
Removes annotation from PDF page
|
boolean |
removeFromPageIncludeReplyAnnot()
Removes annotation and the reply annotation to it from PDF page.
|
void |
setAllowCorrectAnnotationAp(boolean allowCorrectAnnotationAp)
Sets whether to allow to correct annotation appearance
|
boolean |
setAnnotTop() |
boolean |
setBordEffectIntensity(CPDFAnnotation.BorderEffectIntensity intensity) |
boolean |
setBordEffectType(CPDFAnnotation.CPDFBorderEffectType type) |
boolean |
setBorderWidth(float width)
Sets border width of annotation.
|
boolean |
setContent(java.lang.String content)
Sets annotation content.
|
boolean |
setCreationDate(CPDFDate date)
Sets the creation date of annotation.
|
boolean |
setFlags(int flag)
Sets annotation flag.
|
boolean |
setHidden(boolean isHidden)
This is a convenience property that checks for `CPDFAnnotationFlagHidden` in `flags`.
|
boolean |
setLocked(boolean isLocked)
This is a convenience property that checks for `CPDFAnnotationFlagLocked` in `flags`.
|
boolean |
setMarkedAnnotState(CPDFAnnotation.MarkState markState)
Set mark state of the reply annotation.
|
boolean |
setName(java.lang.String name)
Not in use currently
|
void |
setOnAnnotationChangedListener(OnAnnotationChangedListener onAnnotationChanged) |
boolean |
setReadOnly(boolean isReadOnly)
This is a convenience property that checks for `CPDFAnnotationFlagReadOnly` in `flags`.
|
boolean |
setRecentlyModifyDate(CPDFDate date)
Sets the modification date of annotation.
|
boolean |
setRect(android.graphics.RectF rect)
Sets annotation rectangle.
|
boolean |
setReviewAnnotState(CPDFAnnotation.ReviewState reviewState)
Set the review state of the reply annotation.
|
boolean |
setRotation(int angle) |
boolean |
setSourceRect(android.graphics.RectF rect) |
boolean |
setTitle(java.lang.String title)
Not in use currently
|
boolean |
setVertices(android.graphics.PointF[] pointArr) |
boolean |
updateAp()
Updates annotation appearance.
|
boolean |
updateApWithBitmap(android.graphics.Bitmap bitmap)
Upadates annotation appearance by Bitmap.
|
boolean |
updateApWithImage(java.lang.String imagePath,
java.lang.String smaskPath)
Update annotation appearance with image.
|
public boolean setMarkedAnnotState(CPDFAnnotation.MarkState markState)
markState
- Mark state.public CPDFAnnotation.MarkState getMarkedAnnotState()
public boolean setReviewAnnotState(CPDFAnnotation.ReviewState reviewState)
reviewState
- Review state.public CPDFAnnotation.ReviewState getReviewAnnotState()
public abstract CPDFAnnotationUndoAttr getAnnotationAttr()
public abstract void applyAnnotationAttr(CPDFAnnotationUndoAttr annotationAttr)
public CPDFAnnotation.Type getType()
CPDFAnnotation.Type
public boolean isValid()
public boolean setVertices(android.graphics.PointF[] pointArr)
public boolean setBordEffectType(CPDFAnnotation.CPDFBorderEffectType type)
public boolean setBordEffectIntensity(CPDFAnnotation.BorderEffectIntensity intensity)
public android.graphics.PointF[] getVertices()
public CPDFAnnotation.CPDFBorderEffectType getBordEffectType()
public CPDFAnnotation.BorderEffectIntensity getBordEffectIntensity()
public boolean setRect(android.graphics.RectF rect)
CPDFPage.convertRectToPage(boolean, float, float, RectF)
.rect
- Rectangle on the page.public android.graphics.RectF getRect()
CPDFPage.convertRectToPage(boolean, float, float, RectF)
.public boolean setFlags(int flag)
flag
- Annotation flag.public int getFlags()
public boolean setHidden(boolean isHidden)
isHidden
- True is hide,false otherwisepublic boolean isHidden()
public boolean setReadOnly(boolean isReadOnly)
isReadOnly
- True is readOnly,false otherwisepublic boolean isReadOnly()
public boolean setLocked(boolean isLocked)
isLocked
- True is locked,false is unlockedpublic boolean isLocked()
public boolean setBorderWidth(float width)
width
- Border width of annotation.public float getBorderWidth()
public boolean setContent(java.lang.String content)
content
- Annotation content.public java.lang.String getContent()
public boolean setCreationDate(CPDFDate date)
date
- Creation date of annotation.public CPDFDate getCreationDate()
public boolean setRecentlyModifyDate(CPDFDate date)
date
- Modification date of annotation.public CPDFDate getRecentlyModifyDate()
public boolean setTitle(java.lang.String title)
public java.lang.String getTitle()
public boolean setName(java.lang.String name)
public java.lang.String getName()
public boolean hasAp()
public boolean removeAp()
public int getApRotation()
public boolean updateAp()
public boolean updateApWithImage(java.lang.String imagePath, java.lang.String smaskPath)
imagePath
- Original image pathsmaskPath
- Mask image pathpublic boolean updateApWithBitmap(android.graphics.Bitmap bitmap)
bitmap
- Image resource.public boolean getAppearance(android.graphics.Bitmap bitmap)
bitmap
- Bitmappublic boolean getAppearanceByPixel(android.graphics.Bitmap bitmap, CPDFAnnotation.AppearanceType type)
bitmap
- Bitmappublic boolean isAllowCorrectAnnotationAp()
public void setAllowCorrectAnnotationAp(boolean allowCorrectAnnotationAp)
allowCorrectAnnotationAp
- Whether to allow to correct annotation appearancepublic boolean removeFromPage()
public boolean removeFromPageIncludeReplyAnnot()
public boolean addToPage()
public boolean equal(CPDFAnnotation annotation)
public boolean equal(long annotPtr1)
public long getAnnotPtr()
public void setOnAnnotationChangedListener(OnAnnotationChangedListener onAnnotationChanged)
public void disableListenAttrChanged(boolean recordCurrentStatus)
CPDFUndoManager
不会记录属性改变时的状态。
一般用于,当需要时时刷新数据,并且改变UI的时候使用。这样防止记录很多无用的数据recordCurrentStatus
- 是否记录当前annotation的状态,若参数为true,
则在enableListenAttrChanged()
时将当前annotation的状态添加到CPDFUndoManager
中,
可以使用CPDFUndoManager.undo()
进行恢复操作。
否则,反之。public void enableListenAttrChanged()
CPDFUndoManager
会记录属性改变时的状态。public void close()
public boolean setAnnotTop()
public int getAnnotIndexFromNative()
public boolean moveAnnotIndex(int annotIndex)
public CPDFReplyAnnotation createReplyAnnotation()
public CPDFReplyAnnotation[] getAllReplyAnnotations()
public boolean setRotation(int angle)
public int getRotation()
public android.graphics.RectF getSourceRect()
public boolean setSourceRect(android.graphics.RectF rect)
public android.graphics.PointF[] getRotateRectPoint()