Method from org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationLink Detail: |
public PDAction getAction() throws IOException {
COSDictionary action = (COSDictionary)
this.getDictionary().getDictionaryObject( COSName.A );
return PDActionFactory.createAction( action );
}
Get the action to be performed when this annotation is to be activated. |
public PDBorderStyleDictionary getBorderStyle() {
COSDictionary bs = (COSDictionary) this.getDictionary().getItem(
COSName.getPDFName( "BS" ) );
if (bs != null)
{
return new PDBorderStyleDictionary( bs );
}
else
{
return null;
}
}
This will retrieve the border style dictionary, specifying the width and
dash pattern used in drawing the line. |
public PDDestination getDestination() throws IOException {
COSBase base = getDictionary().getDictionaryObject( COSName.DEST );
PDDestination retval = PDDestination.create( base );
return retval;
}
Get the destination to be displayed when the annotation is activated. Either
this or the A should be set but not both. |
public String getHighlightMode() {
return getDictionary().getNameAsString( COSName.H, HIGHLIGHT_MODE_INVERT );
}
Set the highlight mode for when the mouse is depressed.
See the HIGHLIGHT_MODE_XXX constants. |
public PDActionURI getPreviousURI() {
COSDictionary pa = (COSDictionary) getDictionary().getDictionaryObject("PA");
if ( pa != null )
{
return new PDActionURI( pa );
}
else
{
return null;
}
}
This will set the previous URI action, in case it's
needed. |
public float[] getQuadPoints() {
COSArray quadPoints = (COSArray) getDictionary().getDictionaryObject( "QuadPoints" );
if (quadPoints != null)
{
return quadPoints.toFloatArray();
}
else
{
return null; // Should never happen as this is a required item
}
}
This will retrieve the set of quadpoints which encompass the areas of
this annotation which will activate. |
public void setAction(PDAction action) {
this.getDictionary().setItem( COSName.A, action );
}
Set the annotation action.
As of PDF 1.6 this is only used for Widget Annotations |
public void setBorderStyle(PDBorderStyleDictionary bs) {
this.getDictionary().setItem( "BS", bs);
}
This will set the border style dictionary, specifying the width and dash
pattern used in drawing the line. |
public void setDestination(PDDestination dest) {
getDictionary().setItem( COSName.DEST, dest );
}
The new destination value. |
public void setHighlightMode(String mode) {
getDictionary().setName( COSName.H, mode );
}
Set the highlight mode. See the HIGHLIGHT_MODE_XXX constants. |
public void setPreviousURI(PDActionURI pa) {
getDictionary().setItem( "PA", pa );
}
This will set the previous URI action, in case it
needs to be retrieved at later date. |
public void setQuadPoints(float[] quadPoints) {
COSArray newQuadPoints = new COSArray();
newQuadPoints.setFloatArray( quadPoints );
getDictionary().setItem( "QuadPoints", newQuadPoints );
}
This will set the set of quadpoints which encompass the areas of this
annotation which will activate. |