Author: lehmi
Date: Sun Mar  7 14:29:06 2010
New Revision: 920000

URL: http://svn.apache.org/viewvc?rev=920000&view=rev
Log:
PDFBOX-640: added getter/setter for the alternate field name of a PDField. 
Patch by Johannes Koch (johannes dot koch at fit dot fraunhofer dot de)

Modified:
    
pdfbox/trunk/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java

Modified: 
pdfbox/trunk/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java?rev=920000&r1=919999&r2=920000&view=diff
==============================================================================
--- 
pdfbox/trunk/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java
 (original)
+++ 
pdfbox/trunk/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java
 Sun Mar  7 14:29:06 2010
@@ -136,6 +136,26 @@
     }
 
     /**
+     * Gets the alternate name of the field.
+     * 
+     * @return the alternate name of the field
+     */
+    public String getAlternateFieldName()
+    {
+        return this.getDictionary().getString("TU");
+    }
+
+    /**
+     * This will set the alternate name of the field.
+     * 
+     * @param alternateFieldName the alternate name of the field
+     */
+    public void setAlternateFieldName(String alternateFieldName)
+    {
+        this.getDictionary().setString("TU", alternateFieldName);
+    }
+
+    /**
      * Get the FT entry of the field.  This is a read only field and is set 
depending
      * on the actual type.  The field type is an inheritable attribute.  This 
method will
      * return only the direct value on this object.  Use the findFieldType for 
an upward


Reply via email to