LinkAnnotation
Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation
public final class LinkAnnotation extends Annotation
Represents either a hypertext link to a destination elsewhere in the document or an action to be performed.
Constructors
Constructor | Description |
---|---|
LinkAnnotation(Page page, Rectangle rect) | Creates new Link annotation on the specified page. |
Methods
Method | Description |
---|---|
getAction() | Get an action to be performed when the link annotation is activated. |
setAction(PdfAction value) | Set an action to be performed when the link annotation is activated. |
getDestination() | Get a destination to be displayed when the annotation is activated. |
setDestination(IAppointment value) | Set a destination to be displayed when the annotation is activated. |
accept(AnnotationSelector visitor) | Accepts visitor object to process the annotation. |
getHighlighting() | Get the visual effect to be used when the mouse button is pressed or held down inside its active area. |
setHighlighting(int value) | Set the visual effect to be used when the mouse button is pressed or held down inside its active area. |
getAnnotationType() | Gets type of annotation. |
LinkAnnotation(Page page, Rectangle rect)
public LinkAnnotation(Page page, Rectangle rect)
Creates new Link 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. |
getAction()
public PdfAction getAction()
Get an action to be performed when the link annotation is activated.
Returns: PdfAction - PdfAction value
setAction(PdfAction value)
public void setAction(PdfAction value)
Set an action to be performed when the link annotation is activated.
Parameters:
Parameter | Type | Description |
---|---|---|
value | PdfAction | PdfAction object |
getDestination()
public IAppointment getDestination()
Get a destination to be displayed when the annotation is activated.
Returns: IAppointment - IAppointment value
setDestination(IAppointment value)
public void setDestination(IAppointment value)
Set a destination to be displayed when the annotation is activated.
Parameters:
Parameter | Type | Description |
---|---|---|
value | IAppointment | IAppointment object |
accept(AnnotationSelector visitor)
public void accept(AnnotationSelector visitor)
Accepts visitor object to process the annotation.
Parameters:
Parameter | Type | Description |
---|---|---|
visitor | AnnotationSelector | Visitor object. |
getHighlighting()
public int getHighlighting()
Get the visual effect to be used when the mouse button is pressed or held down inside its active area.
Returns: int - HighlightingMode element
setHighlighting(int value)
public void setHighlighting(int value)
Set the visual effect to be used when the mouse button is pressed or held down inside its active area.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | HighlightingMode element |
getAnnotationType()
public AnnotationType getAnnotationType()
Gets type of annotation.
Returns: AnnotationType - AnnotationType element