jPod PDF library

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, de.intarsys.tools.attribute.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)
           
 List<PDForm> getForms()
          Collects all appearance forms within this annotation dictionary.
 PDForm getNormalAppearance(COSName state)
           
 PDForm getRolloverAppearance(COSName state)
           
 boolean isDefined()
          true if this appearance dictionary has valid contents.
 boolean isDefined(COSName key, COSName state)
          true if this appearance dictionary has valid contents for the requested rendering context and appearance state.
 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_D

public static final COSName DK_D

DK_N

public static final COSName DK_N

DK_R

public static final COSName DK_R

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.

getDownAppearance

public PDForm getDownAppearance(COSName state)

getForms

public List<PDForm> getForms()
Collects all appearance forms within this annotation dictionary.

Returns:
The appearance forms.

getNormalAppearance

public PDForm getNormalAppearance(COSName state)

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.

isDefined

public boolean isDefined(COSName key,
                         COSName state)
true if this appearance dictionary has valid contents for the requested rendering context and appearance state.

Returns:
true if this appearance dictionary has valid contents for the requested rendering context and appearance state.

setDownAppearance

public void setDownAppearance(COSName state,
                              PDForm form)

setNormalAppearance

public void setNormalAppearance(COSName state,
                                PDForm form)

setRolloverAppearance

public void setRolloverAppearance(COSName state,
                                  PDForm form)

jPod PDF library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.