TextAnnotation
Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation, com.aspose.pdf.MarkupAnnotation
public final class TextAnnotation extends MarkupAnnotation
Represents a text annotation that is a “sticky note” attached to a point in the PDF document.
Constructors
Constructor | Description |
---|---|
TextAnnotation(IDocument document) | Constructor for annotation when used in Generator. |
TextAnnotation(Page page, Rectangle rect) | Creates new Text annotation on the specified page. |
TextAnnotation() | Create TextAnnotation instance |
Methods
Method | Description |
---|---|
getOpen() | Gets a flag specifying whether the annotation should initially be displayed open. |
setOpen(boolean value) | Sets a flag specifying whether the annotation should initially be displayed open. |
getIcon() | Gets an icon to be used in displaying the annotation. |
setIcon(int value) | Sets an icon to be used in displaying the annotation. |
getState() | Gets the state to which the original annotation should be set. |
setState(int value) | Sets the state to which the original annotation should be set. |
getAnnotationType() | Gets type of annotation. |
accept(AnnotationSelector visitor) | Accepts visitor object to process the annotation. |
getStateModel() | Gets state model |
changeAfterResize(Matrix transform) | Overrides the definition in the base class with an empty body. |
TextAnnotation(IDocument document)
public TextAnnotation(IDocument document)
Constructor for annotation when used in Generator.
Parameters:
Parameter | Type | Description |
---|---|---|
document | IDocument | Document where text annotation will be created. |
TextAnnotation(Page page, Rectangle rect)
public TextAnnotation(Page page, Rectangle rect)
Creates new Text annotation on the specified page.
Parameters:
Parameter | Type | Description |
---|---|---|
page | Page | The document’s page where annotation should be created. |
rect | Rectangle | The annotation rectangle, defining the location of the annotation on the page. |
TextAnnotation()
public TextAnnotation()
Create TextAnnotation instance
getOpen()
public boolean getOpen()
Gets a flag specifying whether the annotation should initially be displayed open.
Returns: boolean - boolean value
setOpen(boolean value)
public void setOpen(boolean value)
Sets a flag specifying whether the annotation should initially be displayed open.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean value |
getIcon()
public int getIcon()
Gets an icon to be used in displaying the annotation.
Returns: int - TextIcon value
setIcon(int value)
public void setIcon(int value)
Sets an icon to be used in displaying the annotation.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | TextIcon value |
getState()
public int getState()
Gets the state to which the original annotation should be set.
Returns: int - AnnotationState value
setState(int value)
public void setState(int value)
Sets the state to which the original annotation should be set.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | AnnotationState value |
getAnnotationType()
public AnnotationType getAnnotationType()
Gets type of annotation.
Returns: AnnotationType - AnnotationType value
accept(AnnotationSelector visitor)
public void accept(AnnotationSelector visitor)
Accepts visitor object to process the annotation.
Parameters:
Parameter | Type | Description |
---|---|---|
visitor | AnnotationSelector | Visitor object. |
getStateModel()
public AnnotationStateModel getStateModel()
Gets state model
Returns: AnnotationStateModel - AnnotationStateModel value
changeAfterResize(Matrix transform)
public void changeAfterResize(Matrix transform)
Overrides the definition in the base class with an empty body.
Parameters:
Parameter | Type | Description |
---|---|---|
transform | Matrix | Matrix specifying the transformation. |