intarsys PDF library API

de.intarsys.pdf.pd
Class PDAppearance

java.lang.Object
  extended by de.intarsys.pdf.cos.COSBasedObject
      extended by de.intarsys.pdf.pd.PDObject
          extended by de.intarsys.pdf.pd.PDAppearance
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDAppearance
extends PDObject

The PDAppearance describes the visual content of a PDAnnotation.

The annotation supports different visual feedback dependent on the kind of user interaction currently in effect. - Normal - Down - Rollover Additionaly, each of these appearances is supported for the different logical states an annotation can enter (for example "On" and "Off" in a checkbox).

The PDForm objects responsible for this feedback are described here.


Nested Class Summary
static class PDAppearance.MetaClass
          The meta class implementation
 
Field Summary
static COSName DK_D
           
static COSName DK_N
           
static COSName DK_R
           
static PDAppearance.MetaClass META
          The meta class instance
 
Fields inherited from class de.intarsys.pdf.pd.PDObject
DK_Subtype, DK_Type
 
Method Summary
 PDForm getAppearance(COSName key, COSName state)
          The PDForm for state state.
 PDForm getDownAppearance(COSName state)
           
 PDForm getNormalAppearance(COSName state)
           
 PDForm getRolloverAppearance(COSName state)
           
 boolean isDefined()
          true if this appearance dictionary has valid contents.
 void setDownAppearance(COSName state, PDForm form)
           
 void setNormalAppearance(COSName state, PDForm form)
           
 void setRolloverAppearance(COSName state, PDForm form)
           
 
Methods inherited from class de.intarsys.pdf.pd.PDObject
cosGetFieldDescendant, cosGetFieldInheritable, cosGetFieldInherited, cosGetSubtype, cosGetType, cosRemoveFieldInheritable, cosSetFieldInheritable, cosSetSubtype, cosSetType, getDoc, getGenericChildren, getGenericParent, setGenericParent, toString
 
Methods inherited from class de.intarsys.pdf.cos.COSBasedObject
changed, cosGetArray, cosGetDict, cosGetDoc, cosGetField, cosGetObject, cosGetStream, cosHasField, cosRemoveField, cosSetField, getAttribute, getFieldBoolean, getFieldDate, getFieldFixed, getFieldFixedArray, getFieldInt, getFieldMLString, getFieldString, invalidateCaches, removeAttribute, setAttribute, setFieldBoolean, setFieldFixed, setFieldInt, setFieldMLString, setFieldName, setFieldObject, setFieldString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DK_N

public static final COSName DK_N

DK_R

public static final COSName DK_R

DK_D

public static final COSName DK_D

META

public static final PDAppearance.MetaClass META
The meta class instance

Method Detail

getAppearance

public PDForm getAppearance(COSName key,
                            COSName state)
The PDForm for state state. key defines the interaction context and is one of "/D", "/R" or "/N". If no PDForm is available, return the PDForm for the "/N" context.

Parameters:
key - The interaction context
state - The PDAnnotation state.
Returns:
The PDForm for state state.

setDownAppearance

public void setDownAppearance(COSName state,
                              PDForm form)

getDownAppearance

public PDForm getDownAppearance(COSName state)

setNormalAppearance

public void setNormalAppearance(COSName state,
                                PDForm form)

getNormalAppearance

public PDForm getNormalAppearance(COSName state)

setRolloverAppearance

public void setRolloverAppearance(COSName state,
                                  PDForm form)

getRolloverAppearance

public PDForm getRolloverAppearance(COSName state)

isDefined

public boolean isDefined()
true if this appearance dictionary has valid contents. From time to time there may be an empty /AP stub around, in this case this method returns false.

Returns:
true if this appearance dictionary has valid contents.

intarsys PDF library API

Copyright © 2006 intarsys consulting GmbH. All Rights Reserved.