Method from org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget 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 PDAnnotationAdditionalActions getActions() {
COSDictionary aa = (COSDictionary)this.getDictionary().getDictionaryObject( "AA" );
PDAnnotationAdditionalActions retval = null;
if( aa != null )
{
retval = new PDAnnotationAdditionalActions( aa );
}
return retval;
}
Get the additional actions for this field. This will return null
if there are no additional actions for this field.
As of PDF 1.6 this is only used for Widget Annotations. |
public PDAppearanceCharacteristicsDictionary getAppearanceCharacteristics() {
COSBase mk = this.getDictionary().getDictionaryObject(COSName.getPDFName("MK"));
if (mk instanceof COSDictionary)
{
return new PDAppearanceCharacteristicsDictionary((COSDictionary) mk);
}
return null;
}
Returns the appearance characteristics dictionary. |
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 String getHighlightingMode() {
return this.getDictionary().getNameAsString(COSName.H, "I");
}
Returns the highlighting mode. Default value: I
N
- (None) No highlighting.
I
- (Invert) Invert the contents of the annotation rectangle.
O
- (Outline) Invert the annotation's border.
P
- (Push) Display the annotation's down appearance, if any. If no
down appearance is defined, the contents of the annotation rectangle
shall be offset to appear as if it were pushed below the surface of
the page
T
- (Toggle) Same as
P (which is preferred).
|
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 setActions(PDAnnotationAdditionalActions actions) {
this.getDictionary().setItem( "AA", actions );
}
Set the actions of the field. |
public void setAppearanceCharacteristics(PDAppearanceCharacteristicsDictionary appearanceCharacteristics) {
this.getDictionary().setItem("MK", appearanceCharacteristics);
}
Sets the appearance characteristics dictionary. |
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 setHighlightingMode(String highlightingMode) {
if ((highlightingMode == null)
|| "N".equals(highlightingMode) || "I".equals(highlightingMode)
|| "O".equals(highlightingMode) || "P".equals(highlightingMode)
|| "T".equals(highlightingMode))
{
this.getDictionary().setName(COSName.H, highlightingMode);
}
else
{
throw new IllegalArgumentException( "Valid values for highlighting mode are " +
"'N', 'N', 'O', 'P' or 'T'" );
}
}
Sets the highlighting mode.
N
- (None) No highlighting.
I
- (Invert) Invert the contents of the annotation rectangle.
O
- (Outline) Invert the annotation's border.
P
- (Push) Display the annotation's down appearance, if any. If no
down appearance is defined, the contents of the annotation rectangle
shall be offset to appear as if it were pushed below the surface of
the page
T
- (Toggle) Same as
P (which is preferred).
|