You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ms...@apache.org on 2014/12/19 22:20:31 UTC

svn commit: r1646874 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextField.java

Author: msahyoun
Date: Fri Dec 19 21:20:31 2014
New Revision: 1646874

URL: http://svn.apache.org/r1646874
Log:
PDFBOX-2516 fix typo; javadoc cleanups

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextField.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextField.java?rev=1646874&r1=1646873&r2=1646874&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextField.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextField.java Fri Dec 19 21:20:31 2014
@@ -21,7 +21,6 @@ import java.io.IOException;
 import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSDictionary;
 import org.apache.pdfbox.cos.COSName;
-import org.apache.pdfbox.cos.COSStream;
 import org.apache.pdfbox.cos.COSString;
 import org.apache.pdfbox.pdmodel.common.PDTextStream;
 
@@ -76,10 +75,11 @@ public final class PDTextField extends P
     }
 
     /**
-     * setValue sets the default value for the field.
+     * Sets the default value for the field.
      * 
+     * The value is stored in the field dictionaries "DV" entry.
+     *
      * @param value the default value
-     * 
      */
     public void setDefaultValue(String value)
     {
@@ -96,10 +96,11 @@ public final class PDTextField extends P
     }
     
     /**
-     * getValue gets the value of the "V" entry.
+     * Get the fields default value.
      * 
-     * @return The value of this entry.
+     * The value is stored in the field dictionaries "DV" entry.
      * 
+     * @return The value of this entry.
      */
     @Override
     public String getDefaultValue()
@@ -116,10 +117,11 @@ public final class PDTextField extends P
     
     
     /**
-     * setValue sets the entry "V" to the given value.
+     * Set the fields value.
      * 
-     * @param value the value
+     * The value is stored in the field dictionaries "V" entry.
      * 
+     * @param value the value
      */
     public void setValue(String value)
     {
@@ -131,7 +133,7 @@ public final class PDTextField extends P
         }  
         else
         {
-            removeInheritableAttribute(COSName.DV);
+            removeInheritableAttribute(COSName.V);
         }
         
         // TODO move appearance generation out of fields PD model
@@ -139,11 +141,12 @@ public final class PDTextField extends P
     }
 
     /**
-     * getValue gets the value of the "V" entry.
+     * Get the fields value.
      * 
-     * @return The value of this entry.
-     * @throws IOException 
+     * The value is stored in the field dictionaries "V" entry.
      * 
+     * @return The value of this entry.
+     * @throws IOException if the field dictionary entry is not a text type
      */
     @Override
     public String getValue() throws IOException