pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1677172 - in /pdfbox/trunk/pdfbox/src: main/java/org/apache/pdfbox/pdmodel/interactive/form/ test/java/org/apache/pdfbox/pdmodel/interactive/form/
Date Fri, 01 May 2015 16:24:49 GMT
Author: msahyoun
Date: Fri May  1 16:24:48 2015
New Revision: 1677172

URL: http://svn.apache.org/r1677172
Log:
PDFBOX-2783: adjust getCOSObject() return type, deprecate getDictionary()

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDButton.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDCheckbox.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDChoice.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDComboBox.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDListBox.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDNonTerminalField.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioButton.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureField.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextField.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDButtonTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDChoiceTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureFieldTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextFieldTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestCheckBox.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestListBox.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestRadioButtons.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDButton.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDButton.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDButton.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDButton.java Fri May  1 16:24:48 2015
@@ -69,7 +69,7 @@ public abstract class PDButton extends P
     public PDButton(PDAcroForm theAcroForm)
     {
         super( theAcroForm );
-        getDictionary().setItem(COSName.FT, COSName.BTN);
+        getCOSObject().setItem(COSName.FT, COSName.BTN);
     }
     
     /**
@@ -91,7 +91,7 @@ public abstract class PDButton extends P
      */
     public boolean isPushButton()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_PUSHBUTTON );
+        return getCOSObject().getFlag( COSName.FF, FLAG_PUSHBUTTON );
     }
 
     /**
@@ -101,7 +101,7 @@ public abstract class PDButton extends P
      */
     public void setPushButton( boolean pushbutton )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_PUSHBUTTON, pushbutton );
+        getCOSObject().setFlag( COSName.FF, FLAG_PUSHBUTTON, pushbutton );
     }
 
     /**
@@ -111,7 +111,7 @@ public abstract class PDButton extends P
      */
     public boolean isRadioButton()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_RADIO );
+        return getCOSObject().getFlag( COSName.FF, FLAG_RADIO );
     }
 
     /**
@@ -121,7 +121,7 @@ public abstract class PDButton extends P
      */
     public void setRadioButton( boolean radiobutton )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_RADIO, radiobutton );
+        getCOSObject().setFlag( COSName.FF, FLAG_RADIO, radiobutton );
     }   
     
     
@@ -161,11 +161,11 @@ public abstract class PDButton extends P
     {
         if (defaultValue == null)
         {
-            getDictionary().removeItem(COSName.DV);
+            getCOSObject().removeItem(COSName.DV);
         }
         else
         {
-            getDictionary().setItem(COSName.DV, COSName.getPDFName(defaultValue));
+            getCOSObject().setItem(COSName.DV, COSName.getPDFName(defaultValue));
         }
     }
     

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDCheckbox.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDCheckbox.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDCheckbox.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDCheckbox.java Fri May  1 16:24:48 2015
@@ -76,7 +76,7 @@ public final class PDCheckbox extends PD
             // empty catch blocks.
             return false;
         }
-        COSName radioValue = (COSName)getDictionary().getDictionaryObject( COSName.AS );
+        COSName radioValue = (COSName)getCOSObject().getDictionaryObject( COSName.AS );
         if( radioValue != null && fieldValue != null && radioValue.getName().equals( onValue ) )
         {
             return true;
@@ -92,7 +92,7 @@ public final class PDCheckbox extends PD
     {
         String onValue = getOnValue();
         setValue(onValue);
-        getDictionary().setItem(COSName.AS, COSName.getPDFName(onValue));
+        getCOSObject().setItem(COSName.AS, COSName.getPDFName(onValue));
     }
 
     /**
@@ -100,7 +100,7 @@ public final class PDCheckbox extends PD
      */
     public void unCheck()
     {
-        getDictionary().setItem(COSName.AS, PDButton.OFF);
+        getCOSObject().setItem(COSName.AS, PDButton.OFF);
     }
 
     /**
@@ -120,7 +120,7 @@ public final class PDCheckbox extends PD
      */
     public String getOnValue()
     {
-        COSDictionary ap = (COSDictionary) getDictionary().getDictionaryObject(COSName.AP);
+        COSDictionary ap = (COSDictionary) getCOSObject().getDictionaryObject(COSName.AP);
         COSBase n = ap.getDictionaryObject(COSName.N);
 
         //N can be a COSDictionary or a COSStream
@@ -171,14 +171,14 @@ public final class PDCheckbox extends PD
     {
         if (value == null)
         {
-            getDictionary().removeItem(COSName.V);
-            getDictionary().setItem( COSName.AS, PDButton.OFF );
+            getCOSObject().removeItem(COSName.V);
+            getCOSObject().setItem( COSName.AS, PDButton.OFF );
         }
         else
         {
             COSName nameValue = COSName.getPDFName(value);
-            getDictionary().setItem(COSName.V, nameValue);
-            getDictionary().setItem( COSName.AS, nameValue);
+            getCOSObject().setItem(COSName.V, nameValue);
+            getCOSObject().setItem( COSName.AS, nameValue);
         }
     }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDChoice.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDChoice.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDChoice.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDChoice.java Fri May  1 16:24:48 2015
@@ -53,7 +53,7 @@ public abstract class PDChoice extends P
     public PDChoice(PDAcroForm theAcroForm)
     {
         super( theAcroForm );
-        getDictionary().setItem(COSName.FT, COSName.CH);
+        getCOSObject().setItem(COSName.FT, COSName.CH);
     }
 
     /**
@@ -95,12 +95,12 @@ public abstract class PDChoice extends P
             }
             else
             {
-                getDictionary().setString(COSName.DV, (String)value);
+                getCOSObject().setString(COSName.DV, (String)value);
             }
         }
         else
         {
-            getDictionary().removeItem(COSName.DV);
+            getCOSObject().removeItem(COSName.DV);
         }
     }
     
@@ -125,7 +125,7 @@ public abstract class PDChoice extends P
      */
     public List<String> getOptions()
     {
-        COSBase values = getDictionary().getDictionaryObject(COSName.OPT);
+        COSBase values = getCOSObject().getDictionaryObject(COSName.OPT);
         return FieldUtils.getPairableItems(values, 0);
     }
 
@@ -152,11 +152,11 @@ public abstract class PDChoice extends P
             {
                 Collections.sort(displayValues);
             }
-            getDictionary().setItem(COSName.OPT, COSArrayList.convertStringListToCOSStringCOSArray(displayValues));
+            getCOSObject().setItem(COSName.OPT, COSArrayList.convertStringListToCOSStringCOSArray(displayValues));
         }
         else
         {
-            getDictionary().removeItem(COSName.OPT);
+            getCOSObject().removeItem(COSName.OPT);
         }
     }
 
@@ -204,12 +204,12 @@ public abstract class PDChoice extends P
                     entry.add(new COSString(keyValuePairs.get(i).getValue()));
                     options.add(entry);
                 }
-                getDictionary().setItem(COSName.OPT, options);
+                getCOSObject().setItem(COSName.OPT, options);
             }
         }
         else
         {
-            getDictionary().removeItem(COSName.OPT);
+            getCOSObject().removeItem(COSName.OPT);
         }      
     }
 
@@ -227,7 +227,7 @@ public abstract class PDChoice extends P
      */
     public List<String> getOptionsDisplayValues()
     {
-        COSBase values = getDictionary().getDictionaryObject(COSName.OPT);
+        COSBase values = getCOSObject().getDictionaryObject(COSName.OPT);
         return FieldUtils.getPairableItems(values, 1);
     }
 
@@ -261,7 +261,7 @@ public abstract class PDChoice extends P
      */
     public List<Integer> getSelectedOptionsIndex()
     {
-        COSBase value = getDictionary().getDictionaryObject(COSName.I);
+        COSBase value = getCOSObject().getDictionaryObject(COSName.I);
         if (value != null)
         {
             return COSArrayList.convertIntegerCOSArrayToList((COSArray) value);
@@ -293,11 +293,11 @@ public abstract class PDChoice extends P
                 throw new IllegalArgumentException(
                         "Setting the indices is not allowed for choice fields not allowing multiple selections.");
             }
-            getDictionary().setItem(COSName.I, COSArrayList.converterToCOSArray(values));
+            getCOSObject().setItem(COSName.I, COSArrayList.converterToCOSArray(values));
         }
         else
         {
-            getDictionary().removeItem(COSName.I);
+            getCOSObject().removeItem(COSName.I);
         }
     }
 
@@ -314,7 +314,7 @@ public abstract class PDChoice extends P
      */
     public boolean isSort()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_SORT );
+        return getCOSObject().getFlag( COSName.FF, FLAG_SORT );
     }
 
     /**
@@ -325,7 +325,7 @@ public abstract class PDChoice extends P
      */
     public void setSort( boolean sort )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_SORT, sort );
+        getCOSObject().setFlag( COSName.FF, FLAG_SORT, sort );
     }
 
     /**
@@ -335,7 +335,7 @@ public abstract class PDChoice extends P
      */
     public boolean isMultiSelect()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_MULTI_SELECT );
+        return getCOSObject().getFlag( COSName.FF, FLAG_MULTI_SELECT );
     }
 
     /**
@@ -345,7 +345,7 @@ public abstract class PDChoice extends P
      */
     public void setMultiSelect( boolean multiSelect )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_MULTI_SELECT, multiSelect );
+        getCOSObject().setFlag( COSName.FF, FLAG_MULTI_SELECT, multiSelect );
     }
 
     /**
@@ -355,7 +355,7 @@ public abstract class PDChoice extends P
      */
     public boolean isDoNotSpellCheck()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_DO_NOT_SPELL_CHECK );
+        return getCOSObject().getFlag( COSName.FF, FLAG_DO_NOT_SPELL_CHECK );
     }
 
     /**
@@ -365,7 +365,7 @@ public abstract class PDChoice extends P
      */
     public void setDoNotSpellCheck( boolean doNotSpellCheck )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_DO_NOT_SPELL_CHECK, doNotSpellCheck );
+        getCOSObject().setFlag( COSName.FF, FLAG_DO_NOT_SPELL_CHECK, doNotSpellCheck );
     }
 
     /**
@@ -375,7 +375,7 @@ public abstract class PDChoice extends P
      */
     public boolean isCommitOnSelChange()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_COMMIT_ON_SEL_CHANGE );
+        return getCOSObject().getFlag( COSName.FF, FLAG_COMMIT_ON_SEL_CHANGE );
     }
 
     /**
@@ -385,7 +385,7 @@ public abstract class PDChoice extends P
      */
     public void setCommitOnSelChange( boolean commitOnSelChange )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_COMMIT_ON_SEL_CHANGE, commitOnSelChange );
+        getCOSObject().setFlag( COSName.FF, FLAG_COMMIT_ON_SEL_CHANGE, commitOnSelChange );
     }
 
     /**
@@ -395,7 +395,7 @@ public abstract class PDChoice extends P
      */
     public boolean isCombo()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_COMBO );
+        return getCOSObject().getFlag( COSName.FF, FLAG_COMBO );
     }
 
     /**
@@ -405,7 +405,7 @@ public abstract class PDChoice extends P
      */
     public void setCombo( boolean combo )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_COMBO, combo );
+        getCOSObject().setFlag( COSName.FF, FLAG_COMBO, combo );
     }
 
     /**
@@ -424,14 +424,14 @@ public abstract class PDChoice extends P
             }
             else
             {
-                getDictionary().setString(COSName.V, (String)value);
+                getCOSObject().setString(COSName.V, (String)value);
                 // remove I key for single valued choice field
                 setSelectedOptionsIndex(null);
             }
         }
         else
         {
-            getDictionary().removeItem(COSName.V);
+            getCOSObject().removeItem(COSName.V);
         }
         // TODO create/update appearance
     }
@@ -453,12 +453,12 @@ public abstract class PDChoice extends P
             {
                 throw new IllegalArgumentException("The values are not contained in the selectable options.");
             }
-            getDictionary().setItem(COSName.V, COSArrayList.convertStringListToCOSStringCOSArray(values));
+            getCOSObject().setItem(COSName.V, COSArrayList.convertStringListToCOSStringCOSArray(values));
             updateSelectedOptionsIndex(values);
         }
         else
         {
-            getDictionary().removeItem(COSName.V);
+            getCOSObject().removeItem(COSName.V);
         }
         // TODO create/update appearance
     }    
@@ -471,7 +471,7 @@ public abstract class PDChoice extends P
     @Override
     public List<String> getValue()
     {
-        COSBase value = getDictionary().getDictionaryObject( COSName.V);
+        COSBase value = getCOSObject().getDictionaryObject( COSName.V);
         if (value instanceof COSString)
         {
             List<String> array = new ArrayList<String>();

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDComboBox.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDComboBox.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDComboBox.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDComboBox.java Fri May  1 16:24:48 2015
@@ -61,7 +61,7 @@ public final class PDComboBox extends PD
      */
     public boolean isEdit()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_EDIT );
+        return getCOSObject().getFlag( COSName.FF, FLAG_EDIT );
     }
 
     /**
@@ -71,7 +71,7 @@ public final class PDComboBox extends PD
      */
     public void setEdit( boolean edit )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_EDIT, edit );
+        getCOSObject().setFlag( COSName.FF, FLAG_EDIT, edit );
     }
 
     /**
@@ -93,14 +93,14 @@ public final class PDComboBox extends PD
             }
             else
             {
-                getDictionary().setString(COSName.V, (String)value);
+                getCOSObject().setString(COSName.V, (String)value);
                 // remove I key for single valued choice field
                 setSelectedOptionsIndex(null);
             }
         }
         else
         {
-            getDictionary().removeItem(COSName.V);
+            getCOSObject().removeItem(COSName.V);
         }
         // TODO create/update appearance
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java Fri May  1 16:24:48 2015
@@ -60,7 +60,7 @@ public abstract class PDField extends PD
      */
     public void setActions(PDFormFieldAdditionalActions actions)
     {
-        getDictionary().setItem(COSName.AA, actions);
+        getCOSObject().setItem(COSName.AA, actions);
     }
     
     /**
@@ -70,7 +70,7 @@ public abstract class PDField extends PD
     public int getFieldFlags()
     {
         int retval = 0;
-        COSInteger ff = (COSInteger) getDictionary().getDictionaryObject(COSName.FF);
+        COSInteger ff = (COSInteger) getCOSObject().getDictionaryObject(COSName.FF);
         if (ff != null)
         {
             retval = ff.intValue();
@@ -88,7 +88,7 @@ public abstract class PDField extends PD
     @Override
     public String getFieldType()
     {
-        String fieldType = getDictionary().getNameAsString(COSName.FT);
+        String fieldType = getCOSObject().getNameAsString(COSName.FT);
         if (fieldType == null && getParent() != null)
         {
             fieldType = getParent().getFieldType();

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java Fri May  1 16:24:48 2015
@@ -683,8 +683,10 @@ public abstract class PDFieldTreeNode im
     /**
      * This will get the dictionary associated with this field.
      * 
-     * @return The dictionary that this class wraps.
+     * @deprecated  use {@link #getCOSObject()} instead.
+     * @return the dictionary that this class wraps.
      */
+    @Deprecated
     public COSDictionary getDictionary()
     {
         return dictionary;
@@ -693,10 +695,10 @@ public abstract class PDFieldTreeNode im
     /**
      * Convert this standard java object to a COS object.
      * 
-     * @return The cos object that matches this Java object.
+     * @return the COS object that matches this Java object.
      */
     @Override
-    public COSBase getCOSObject()
+    public COSDictionary getCOSObject()
     {
         return dictionary;
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDListBox.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDListBox.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDListBox.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDListBox.java Fri May  1 16:24:48 2015
@@ -57,7 +57,7 @@ public final class PDListBox extends PDC
      */
     public int getTopIndex()
     {
-        return getDictionary().getInt(COSName.TI, 0);
+        return getCOSObject().getInt(COSName.TI, 0);
     }
 
     /**
@@ -69,11 +69,11 @@ public final class PDListBox extends PDC
     {
         if (topIndex != null)
         {
-            getDictionary().setInt(COSName.TI, topIndex);
+            getCOSObject().setInt(COSName.TI, topIndex);
         }
         else
         {
-            getDictionary().removeItem(COSName.TI);
+            getCOSObject().removeItem(COSName.TI);
         }
     }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDNonTerminalField.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDNonTerminalField.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDNonTerminalField.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDNonTerminalField.java Fri May  1 16:24:48 2015
@@ -62,7 +62,7 @@ public class PDNonTerminalField extends
     public int getFieldFlags()
     {
         int retval = 0;
-        COSInteger ff = (COSInteger) getDictionary().getDictionaryObject(COSName.FF);
+        COSInteger ff = (COSInteger) getCOSObject().getDictionaryObject(COSName.FF);
         if (ff != null)
         {
             retval = ff.intValue();
@@ -78,7 +78,7 @@ public class PDNonTerminalField extends
     public String getFieldType()
     {
         // There is no need to look up the parent hierarchy within a non terminal field
-        return getDictionary().getNameAsString(COSName.FT);
+        return getCOSObject().getNameAsString(COSName.FT);
     }
 
     /**
@@ -88,7 +88,7 @@ public class PDNonTerminalField extends
     public Object getValue()
     {
         // There is no need to look up the parent hierarchy within a non terminal field
-        return getDictionary().getNameAsString(COSName.V);
+        return getCOSObject().getNameAsString(COSName.V);
     }
     
     /**
@@ -98,7 +98,7 @@ public class PDNonTerminalField extends
     public void setValue(String fieldValue)
     {
         // There is no need to look up the parent hierarchy within a non terminal field
-        getDictionary().setString(COSName.V, fieldValue);
+        getCOSObject().setString(COSName.V, fieldValue);
     }
 
     /**
@@ -108,7 +108,7 @@ public class PDNonTerminalField extends
     public Object getDefaultValue()
     {
         // There is no need to look up the parent hierarchy within a non terminal field
-        return getDictionary().getNameAsString(COSName.V);
+        return getCOSObject().getNameAsString(COSName.V);
     }
 
     /**
@@ -118,7 +118,7 @@ public class PDNonTerminalField extends
     public void setDefaultValue(String defaultValue)
     {
         // There is no need to look up the parent hierarchy within a non terminal field
-        getDictionary().setString(COSName.V, defaultValue);
+        getCOSObject().setString(COSName.V, defaultValue);
     }
     
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioButton.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioButton.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioButton.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioButton.java Fri May  1 16:24:48 2015
@@ -72,7 +72,7 @@ public final class PDRadioButton extends
      */
     public void setRadiosInUnison(boolean radiosInUnison)
     {
-        getDictionary().setFlag(COSName.FF, FLAG_RADIOS_IN_UNISON, radiosInUnison);
+        getCOSObject().setFlag(COSName.FF, FLAG_RADIOS_IN_UNISON, radiosInUnison);
     }
 
     /**
@@ -81,7 +81,7 @@ public final class PDRadioButton extends
      */
     public boolean isRadiosInUnison()
     {
-        return getDictionary().getFlag(COSName.FF, FLAG_RADIOS_IN_UNISON);
+        return getCOSObject().getFlag(COSName.FF, FLAG_RADIOS_IN_UNISON);
     }
 
     /**

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureField.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureField.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureField.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureField.java Fri May  1 16:24:48 2015
@@ -57,7 +57,7 @@ public class PDSignatureField extends PD
     public PDSignatureField(PDAcroForm theAcroForm) throws IOException
     {
         super( theAcroForm );
-        getDictionary().setItem(COSName.FT, COSName.SIG);
+        getCOSObject().setItem(COSName.FT, COSName.SIG);
         getWidget().setLocked(true);
         getWidget().setPrinted(true);
         setPartialName(generatePartialName());
@@ -129,11 +129,11 @@ public class PDSignatureField extends PD
     {
         if (value == null)
         {
-            getDictionary().removeItem(COSName.V);
+            getCOSObject().removeItem(COSName.V);
         }
         else
         {
-            getDictionary().setItem(COSName.V, (PDSignature)value);
+            getCOSObject().setItem(COSName.V, (PDSignature)value);
         }
     }
     
@@ -152,7 +152,7 @@ public class PDSignatureField extends PD
      */
     public PDSignature getValue()
     {
-        COSBase dictionary = getDictionary().getDictionaryObject(COSName.V);
+        COSBase dictionary = getCOSObject().getDictionaryObject(COSName.V);
         if (dictionary == null)
         {
             return null;
@@ -169,7 +169,7 @@ public class PDSignatureField extends PD
      */
     public PDSeedValue getSeedValue()
     {
-        COSDictionary dict = (COSDictionary)getDictionary().getDictionaryObject(COSName.SV);
+        COSDictionary dict = (COSDictionary) getCOSObject().getDictionaryObject(COSName.SV);
         PDSeedValue sv = null;
         if (dict != null)
         {
@@ -189,7 +189,7 @@ public class PDSignatureField extends PD
     {
         if (sv != null)
         {
-            getDictionary().setItem(COSName.SV, sv.getCOSObject());
+            getCOSObject().setItem(COSName.SV, sv.getCOSObject());
         }
     }
     

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=1677172&r1=1677171&r2=1677172&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 May  1 16:24:48 2015
@@ -54,7 +54,7 @@ public final class PDTextField extends P
     public PDTextField(PDAcroForm theAcroForm)
     {
         super( theAcroForm );
-        getDictionary().setItem(COSName.FT, COSName.TX);
+        getCOSObject().setItem(COSName.FT, COSName.TX);
     }
 
     /**
@@ -74,7 +74,7 @@ public final class PDTextField extends P
      */
     public boolean isMultiline()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_MULTILINE );
+        return getCOSObject().getFlag( COSName.FF, FLAG_MULTILINE );
     }
 
     /**
@@ -84,7 +84,7 @@ public final class PDTextField extends P
      */
     public void setMultiline( boolean multiline )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_MULTILINE, multiline );
+        getCOSObject().setFlag( COSName.FF, FLAG_MULTILINE, multiline );
     }
 
     /**
@@ -92,7 +92,7 @@ public final class PDTextField extends P
      */
     public boolean isPassword()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_PASSWORD );
+        return getCOSObject().getFlag( COSName.FF, FLAG_PASSWORD );
     }
 
     /**
@@ -102,7 +102,7 @@ public final class PDTextField extends P
      */
     public void setPassword( boolean password )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_PASSWORD, password );
+        getCOSObject().setFlag( COSName.FF, FLAG_PASSWORD, password );
     }
 
     /**
@@ -110,7 +110,7 @@ public final class PDTextField extends P
      */
     public boolean isFileSelect()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_FILE_SELECT );
+        return getCOSObject().getFlag( COSName.FF, FLAG_FILE_SELECT );
     }
 
     /**
@@ -120,7 +120,7 @@ public final class PDTextField extends P
      */
     public void setFileSelect( boolean fileSelect )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_FILE_SELECT, fileSelect );
+        getCOSObject().setFlag( COSName.FF, FLAG_FILE_SELECT, fileSelect );
     }
 
     /**
@@ -128,7 +128,7 @@ public final class PDTextField extends P
      */
     public boolean doNotSpellCheck()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_DO_NOT_SPELL_CHECK );
+        return getCOSObject().getFlag( COSName.FF, FLAG_DO_NOT_SPELL_CHECK );
     }
 
     /**
@@ -138,7 +138,7 @@ public final class PDTextField extends P
      */
     public void setDoNotSpellCheck( boolean doNotSpellCheck )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_DO_NOT_SPELL_CHECK, doNotSpellCheck );
+        getCOSObject().setFlag( COSName.FF, FLAG_DO_NOT_SPELL_CHECK, doNotSpellCheck );
     }
 
     /**
@@ -146,7 +146,7 @@ public final class PDTextField extends P
      */
     public boolean doNotScroll()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_DO_NOT_SCROLL );
+        return getCOSObject().getFlag( COSName.FF, FLAG_DO_NOT_SCROLL );
     }
 
     /**
@@ -156,7 +156,7 @@ public final class PDTextField extends P
      */
     public void setDoNotScroll( boolean doNotScroll )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_DO_NOT_SCROLL, doNotScroll );
+        getCOSObject().setFlag( COSName.FF, FLAG_DO_NOT_SCROLL, doNotScroll );
     }
 
     /**
@@ -164,7 +164,7 @@ public final class PDTextField extends P
      */
     public boolean isComb()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_COMB );
+        return getCOSObject().getFlag( COSName.FF, FLAG_COMB );
     }
 
     /**
@@ -174,7 +174,7 @@ public final class PDTextField extends P
      */
     public void setComb( boolean comb )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_COMB, comb );
+        getCOSObject().setFlag( COSName.FF, FLAG_COMB, comb );
     }
 
     /**
@@ -182,7 +182,7 @@ public final class PDTextField extends P
      */
     public boolean isRichText()
     {
-        return getDictionary().getFlag( COSName.FF, FLAG_RICH_TEXT );
+        return getCOSObject().getFlag( COSName.FF, FLAG_RICH_TEXT );
     }
 
     /**
@@ -192,7 +192,7 @@ public final class PDTextField extends P
      */
     public void setRichText( boolean richText )
     {
-        getDictionary().setFlag( COSName.FF, FLAG_RICH_TEXT, richText );
+        getCOSObject().setFlag( COSName.FF, FLAG_RICH_TEXT, richText );
     }    
     
     
@@ -204,7 +204,7 @@ public final class PDTextField extends P
      */
     public int getMaxLen()
     {
-        return getDictionary().getInt(COSName.MAX_LEN);
+        return getCOSObject().getInt(COSName.MAX_LEN);
     }
 
     /**
@@ -214,7 +214,7 @@ public final class PDTextField extends P
      */
     public void setMaxLen(int maxLen)
     {
-        getDictionary().setInt(COSName.MAX_LEN, maxLen);
+        getCOSObject().setInt(COSName.MAX_LEN, maxLen);
     }
 
     /**

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java Fri May  1 16:24:48 2015
@@ -118,7 +118,7 @@ public abstract class PDVariableText ext
      */
     public String getDefaultStyleString()
     {
-        COSString defaultStyleString = (COSString) getDictionary().getDictionaryObject(COSName.DS);
+        COSString defaultStyleString = (COSString) getCOSObject().getDictionaryObject(COSName.DS);
         return defaultStyleString.getString();
     }
 
@@ -133,11 +133,11 @@ public abstract class PDVariableText ext
     {
         if (defaultStyleString != null)
         {
-            getDictionary().setItem(COSName.DS, new COSString(defaultStyleString));
+            getCOSObject().setItem(COSName.DS, new COSString(defaultStyleString));
         }
         else
         {
-            getDictionary().removeItem(COSName.DS);
+            getCOSObject().removeItem(COSName.DS);
         }
     }    
 
@@ -173,7 +173,7 @@ public abstract class PDVariableText ext
      */
     public void setQ( int q )
     {
-        getDictionary().setInt( COSName.Q, q );
+        getCOSObject().setInt( COSName.Q, q );
     }
     
     /**
@@ -229,11 +229,11 @@ public abstract class PDVariableText ext
     {
         if (richTextValue != null)
         {
-            getDictionary().setItem(COSName.RV, new COSString(richTextValue));
+            getCOSObject().setItem(COSName.RV, new COSString(richTextValue));
         }
         else
         {
-            getDictionary().removeItem(COSName.RV);
+            getCOSObject().removeItem(COSName.RV);
         }        
     }
     
@@ -255,11 +255,11 @@ public abstract class PDVariableText ext
     {
         if (richTextValue != null)
         {
-            getDictionary().setItem(COSName.RV, richTextValue.getCOSObject());
+            getCOSObject().setItem(COSName.RV, richTextValue.getCOSObject());
         }
         else
         {
-            getDictionary().removeItem(COSName.RV);
+            getCOSObject().removeItem(COSName.RV);
         }        
     } 
 }

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDButtonTest.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDButtonTest.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDButtonTest.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDButtonTest.java Fri May  1 16:24:48 2015
@@ -46,7 +46,7 @@ public class PDButtonTest
     {
         PDButton buttonField = new PDCheckbox(acroForm);
         
-        assertEquals(buttonField.getFieldType(), buttonField.getDictionary().getNameAsString(COSName.FT));
+        assertEquals(buttonField.getFieldType(), buttonField.getCOSObject().getNameAsString(COSName.FT));
         assertEquals(buttonField.getFieldType(), "Btn");
         assertFalse(buttonField.isPushButton());
         assertFalse(buttonField.isRadioButton());
@@ -57,7 +57,7 @@ public class PDButtonTest
     {
         PDButton buttonField = new PDPushButton(acroForm);
         
-        assertEquals(buttonField.getFieldType(), buttonField.getDictionary().getNameAsString(COSName.FT));
+        assertEquals(buttonField.getFieldType(), buttonField.getCOSObject().getNameAsString(COSName.FT));
         assertEquals(buttonField.getFieldType(), "Btn");
         assertTrue(buttonField.isPushButton());
         assertFalse(buttonField.isRadioButton());
@@ -68,7 +68,7 @@ public class PDButtonTest
     {
         PDButton buttonField = new PDRadioButton(acroForm);
         
-        assertEquals(buttonField.getFieldType(), buttonField.getDictionary().getNameAsString(COSName.FT));
+        assertEquals(buttonField.getFieldType(), buttonField.getCOSObject().getNameAsString(COSName.FT));
         assertEquals(buttonField.getFieldType(), "Btn");
         assertTrue(buttonField.isRadioButton());
         assertFalse(buttonField.isPushButton());

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDChoiceTest.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDChoiceTest.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDChoiceTest.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDChoiceTest.java Fri May  1 16:24:48 2015
@@ -46,7 +46,7 @@ public class PDChoiceTest
     {
         PDChoice choiceField = new PDListBox(acroForm);
         
-        assertEquals(choiceField.getFieldType(), choiceField.getDictionary().getNameAsString(COSName.FT));
+        assertEquals(choiceField.getFieldType(), choiceField.getCOSObject().getNameAsString(COSName.FT));
         assertEquals(choiceField.getFieldType(), "Ch");
         assertFalse(choiceField.isCombo());
     }
@@ -56,7 +56,7 @@ public class PDChoiceTest
     {
         PDChoice choiceField = new PDComboBox(acroForm);
         
-        assertEquals(choiceField.getFieldType(), choiceField.getDictionary().getNameAsString(COSName.FT));
+        assertEquals(choiceField.getFieldType(), choiceField.getCOSObject().getNameAsString(COSName.FT));
         assertEquals(choiceField.getFieldType(), "Ch");
         assertTrue(choiceField.isCombo());
     }

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureFieldTest.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureFieldTest.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureFieldTest.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureFieldTest.java Fri May  1 16:24:48 2015
@@ -48,10 +48,10 @@ public class PDSignatureFieldTest
     {
         PDSignatureField sigField = new PDSignatureField(acroForm);
         
-        assertEquals(sigField.getFieldType(), sigField.getDictionary().getNameAsString(COSName.FT));
+        assertEquals(sigField.getFieldType(), sigField.getCOSObject().getNameAsString(COSName.FT));
         assertEquals(sigField.getFieldType(), "Sig");
         
-        assertEquals(COSName.ANNOT, sigField.getDictionary().getItem(COSName.TYPE));
-        assertEquals(PDAnnotationWidget.SUB_TYPE, sigField.getDictionary().getNameAsString(COSName.SUBTYPE));
+        assertEquals(COSName.ANNOT, sigField.getCOSObject().getItem(COSName.TYPE));
+        assertEquals(PDAnnotationWidget.SUB_TYPE, sigField.getCOSObject().getNameAsString(COSName.SUBTYPE));
     }
 }

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextFieldTest.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextFieldTest.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextFieldTest.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextFieldTest.java Fri May  1 16:24:48 2015
@@ -46,7 +46,7 @@ public class PDTextFieldTest
     {
         PDFieldTreeNode textField = new PDTextField(acroForm);
         
-        assertEquals(textField.getFieldType(), textField.getDictionary().getNameAsString(COSName.FT));
+        assertEquals(textField.getFieldType(), textField.getCOSObject().getNameAsString(COSName.FT));
         assertEquals(textField.getFieldType(), "Tx");
     }
 
@@ -55,15 +55,15 @@ public class PDTextFieldTest
     {
         PDTextField textField = new PDTextField(acroForm);
 
-        assertNull(textField.getDictionary().getItem(COSName.TYPE));
-        assertNull(textField.getDictionary().getNameAsString(COSName.SUBTYPE));
+        assertNull(textField.getCOSObject().getItem(COSName.TYPE));
+        assertNull(textField.getCOSObject().getNameAsString(COSName.SUBTYPE));
         
         PDAnnotationWidget widget = textField.getWidget();
         
-        assertEquals(COSName.ANNOT, textField.getDictionary().getItem(COSName.TYPE));
-        assertEquals(PDAnnotationWidget.SUB_TYPE, textField.getDictionary().getNameAsString(COSName.SUBTYPE));
+        assertEquals(COSName.ANNOT, textField.getCOSObject().getItem(COSName.TYPE));
+        assertEquals(PDAnnotationWidget.SUB_TYPE, textField.getCOSObject().getNameAsString(COSName.SUBTYPE));
         
-        assertEquals(widget.getDictionary(), textField.getDictionary());
+        assertEquals(widget.getDictionary(), textField.getCOSObject());
     }
 
 }

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestCheckBox.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestCheckBox.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestCheckBox.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestCheckBox.java Fri May  1 16:24:48 2015
@@ -91,10 +91,10 @@ public class TestCheckBox extends TestCa
             options.add("Value02");
             checkBox.setOptions(options);
 
-            COSArray optItem = (COSArray) checkBox.getDictionary().getItem(COSName.OPT);
+            COSArray optItem = (COSArray) checkBox.getCOSObject().getItem(COSName.OPT);
 
             // assert that the values have been correctly set
-            assertNotNull(checkBox.getDictionary().getItem(COSName.OPT));
+            assertNotNull(checkBox.getCOSObject().getItem(COSName.OPT));
             assertEquals(optItem.size(),2);
             assertEquals(options.get(0), optItem.getString(0));
             
@@ -105,7 +105,7 @@ public class TestCheckBox extends TestCa
 
             // assert that the Opt entry is removed
             checkBox.setOptions(null);
-            assertNull(checkBox.getDictionary().getItem(COSName.OPT));
+            assertNull(checkBox.getCOSObject().getItem(COSName.OPT));
             // if there is no Opt entry an empty List shall be returned
             assertEquals(checkBox.getOptions(), new ArrayList<String>());
         }

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java Fri May  1 16:24:48 2015
@@ -146,36 +146,36 @@ public class TestFields extends TestCase
             // assert that there is no value, set the field value and
             // ensure it has been set 
             PDFieldTreeNode field = form.getField("TextField");
-            assertNull(field.getDictionary().getItem(COSName.V));
+            assertNull(field.getCOSObject().getItem(COSName.V));
             field.setValue("field value");
-            assertNotNull(field.getDictionary().getItem(COSName.V));
+            assertNotNull(field.getCOSObject().getItem(COSName.V));
             assertEquals(field.getValue(),"field value");
             
             // assert when setting to null the key has also been removed
-            assertNotNull(field.getDictionary().getItem(COSName.V));
+            assertNotNull(field.getCOSObject().getItem(COSName.V));
             field.setValue(null);
-            assertNull(field.getDictionary().getItem(COSName.V));
+            assertNull(field.getCOSObject().getItem(COSName.V));
             
             // get the RadioButton with a DV entry
             field = form.getField("RadioButtonGroup-DefaultValue");
             assertNotNull(field);
             assertEquals(field.getDefaultValue(),"RadioButton01");
             assertEquals(COSName.getPDFName((String)field.getDefaultValue()),
-                    field.getDictionary().getDictionaryObject(COSName.DV));
+                    field.getCOSObject().getDictionaryObject(COSName.DV));
 
             // get the Checkbox with a DV entry
             field = form.getField("Checkbox-DefaultValue");
             assertNotNull(field);
             assertEquals(field.getDefaultValue(),"Yes");
             assertEquals(field.getDefaultValue(),
-                    ((COSName) field.getDictionary().getDictionaryObject(COSName.DV)).getName());
+                    ((COSName) field.getCOSObject().getDictionaryObject(COSName.DV)).getName());
             
             // get the TextField with a DV entry
             field = form.getField("TextField-DefaultValue");
             assertNotNull(field);
             assertEquals(field.getDefaultValue(),"DefaultValue");
             assertEquals(field.getDefaultValue(),
-                    ((COSString)field.getDictionary().getDictionaryObject(COSName.DV)).getString());
+                    ((COSString)field.getCOSObject().getDictionaryObject(COSName.DV)).getString());
             assertEquals(((PDVariableText)field).getDefaultAppearance(),"/Helv 12 Tf 0 g");
 
             // get a rich text field with a  DV entry
@@ -183,7 +183,7 @@ public class TestFields extends TestCase
             assertNotNull(field);
             assertEquals(field.getDefaultValue(),"DefaultValue");
             assertEquals(field.getDefaultValue(),
-                    ((COSString)field.getDictionary().getDictionaryObject(COSName.DV)).getString());
+                    ((COSString)field.getCOSObject().getDictionaryObject(COSName.DV)).getString());
             assertEquals(field.getValue(), "DefaultValue");
             assertEquals(((PDVariableText)field).getDefaultAppearance(), "/Helv 12 Tf 0 g");
             assertEquals(((PDVariableText)field).getDefaultStyleString(),
@@ -194,7 +194,7 @@ public class TestFields extends TestCase
             // get a rich text field with a text stream for the value
             field = form.getField("LongRichTextField");
             assertNotNull(field);
-            assertEquals(field.getDictionary().getDictionaryObject(
+            assertEquals(field.getCOSObject().getDictionaryObject(
                     COSName.V).getClass().getName(),
                     "org.apache.pdfbox.cos.COSStream");
             assertEquals(((PDTextField)field).getValue().length(),145396);

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestListBox.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestListBox.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestListBox.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestListBox.java Fri May  1 16:24:48 2015
@@ -113,8 +113,8 @@ public class TestListBox extends TestCas
             assertEquals(exportValues,choice.getOptionsExportValues());
 
             // assert that the option values have been correctly set
-            COSArray optItem = (COSArray) choice.getDictionary().getItem(COSName.OPT);
-            assertNotNull(choice.getDictionary().getItem(COSName.OPT));
+            COSArray optItem = (COSArray) choice.getCOSObject().getItem(COSName.OPT);
+            assertNotNull(choice.getCOSObject().getItem(COSName.OPT));
             assertEquals(optItem.size(),exportValues.size());
             assertEquals(exportValues.get(0), optItem.getString(0));
             
@@ -151,24 +151,24 @@ public class TestListBox extends TestCas
             choice.setValue(exportValues);
             
             // assert that the option values have been correctly set
-            COSArray valueItems = (COSArray) choice.getDictionary().getItem(COSName.V);
+            COSArray valueItems = (COSArray) choice.getCOSObject().getItem(COSName.V);
             assertNotNull(valueItems);
             assertEquals(valueItems.size(),exportValues.size());
             assertEquals(exportValues.get(0), valueItems.getString(0));
             
             // assert that the index values have been correctly set
-            COSArray indexItems = (COSArray) choice.getDictionary().getItem(COSName.I);
+            COSArray indexItems = (COSArray) choice.getCOSObject().getItem(COSName.I);
             assertNotNull(indexItems);
             assertEquals(indexItems.size(),exportValues.size());
             
             // setting a single value shall remove the indices
             choice.setValue("export01");
-            indexItems = (COSArray) choice.getDictionary().getItem(COSName.I);
+            indexItems = (COSArray) choice.getCOSObject().getItem(COSName.I);
             assertNull(indexItems);
 
             // assert that the Opt entry is removed
             choice.setOptions(null);
-            assertNull(choice.getDictionary().getItem(COSName.OPT));
+            assertNull(choice.getCOSObject().getItem(COSName.OPT));
             // if there is no Opt entry an empty List shall be returned
             assertEquals(choice.getOptions(), Collections.<String>emptyList());
             
@@ -194,7 +194,7 @@ public class TestListBox extends TestCas
              */
             // assert that the Opt entry is removed
             choice.setOptions(null, displayValues);
-            assertNull(choice.getDictionary().getItem(COSName.OPT));
+            assertNull(choice.getCOSObject().getItem(COSName.OPT));
             
             // if there is no Opt entry an empty list shall be returned
             assertEquals(choice.getOptions(), Collections.<String>emptyList());

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestRadioButtons.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestRadioButtons.java?rev=1677172&r1=1677171&r2=1677172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestRadioButtons.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestRadioButtons.java Fri May  1 16:24:48 2015
@@ -92,10 +92,10 @@ public class TestRadioButtons extends Te
             options.add("Value02");
             radioButton.setOptions(options);
 
-            COSArray optItem = (COSArray) radioButton.getDictionary().getItem(COSName.OPT);
+            COSArray optItem = (COSArray) radioButton.getCOSObject().getItem(COSName.OPT);
 
             // assert that the values have been correctly set
-            assertNotNull(radioButton.getDictionary().getItem(COSName.OPT));
+            assertNotNull(radioButton.getCOSObject().getItem(COSName.OPT));
             assertEquals(optItem.size(),2);
             assertEquals(options.get(0), optItem.getString(0));
             
@@ -106,7 +106,7 @@ public class TestRadioButtons extends Te
 
             // assert that the Opt entry is removed
             radioButton.setOptions(null);
-            assertNull(radioButton.getDictionary().getItem(COSName.OPT));
+            assertNull(radioButton.getCOSObject().getItem(COSName.OPT));
             // if there is no Opt entry an empty List shall be returned
             assertEquals(radioButton.getOptions(), new ArrayList<String>());
         }



Mime
View raw message