pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1679427 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/
Date Thu, 14 May 2015 18:39:53 GMT
Author: jahewson
Date: Thu May 14 18:39:53 2015
New Revision: 1679427

URL: http://svn.apache.org/r1679427
Log:
PDFBOX-2459: Clean up PDField subclasses (whitespace)

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/PDListBox.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDPushButton.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

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=1679427&r1=1679426&r2=1679427&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
Thu May 14 18:39:53 2015
@@ -59,7 +59,7 @@ public abstract class PDButton extends P
      */
     public PDButton(PDAcroForm acroForm)
     {
-        super( acroForm );
+        super(acroForm);
         dictionary.setItem(COSName.FT, COSName.BTN);
     }
     
@@ -90,7 +90,7 @@ public abstract class PDButton extends P
      *
      * @param pushbutton if true the button field is treated as a push button field.
      */
-    public void setPushButton( boolean pushbutton )
+    public void setPushButton(boolean pushbutton)
     {
         dictionary.setFlag(COSName.FF, FLAG_PUSHBUTTON, pushbutton);
     }
@@ -110,7 +110,7 @@ public abstract class PDButton extends P
      *
      * @param radiobutton if true the button field is treated as a radio button field.
      */
-    public void setRadioButton( boolean radiobutton )
+    public void setRadioButton(boolean radiobutton)
     {
         dictionary.setFlag(COSName.FF, FLAG_RADIO, radiobutton);
     }   
@@ -177,7 +177,7 @@ public abstract class PDButton extends P
         {
             return COSArrayList.convertCOSStringCOSArrayToList((COSArray)value);
         }
-        return Collections.<String>emptyList();
+        return Collections.emptyList();
     }
     
     /**

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=1679427&r1=1679426&r2=1679427&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
Thu May 14 18:39:53 2015
@@ -37,7 +37,7 @@ public final class PDCheckbox extends PD
      */
     public PDCheckbox(PDAcroForm acroForm)
     {
-        super( acroForm );
+        super(acroForm);
     }
     
     /**
@@ -47,9 +47,9 @@ public final class PDCheckbox extends PD
      * @param field the PDF object to represent as a field.
      * @param parent the parent node of the node
      */
-    PDCheckbox( PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent)
+    PDCheckbox(PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent)
     {
-        super( acroForm, field, parent);
+        super(acroForm, field, parent);
     }
 
     /**
@@ -76,7 +76,7 @@ public final class PDCheckbox extends PD
             return false;
         }
         COSName radioValue = (COSName)dictionary.getDictionaryObject(COSName.AS);
-        if( radioValue != null && fieldValue != null && radioValue.getName().equals(
onValue ) )
+        if (radioValue != null && fieldValue != null && radioValue.getName().equals(onValue))
         {
             return true;
         }
@@ -123,11 +123,11 @@ public final class PDCheckbox extends PD
         COSBase n = ap.getDictionaryObject(COSName.N);
 
         //N can be a COSDictionary or a COSStream
-        if( n instanceof COSDictionary )
+        if (n instanceof COSDictionary)
         {
-            for( COSName key :((COSDictionary)n).keySet() )
+            for (COSName key :((COSDictionary)n).keySet())
             {
-                if( !key.equals( COSName.OFF) )
+                if (!key.equals(COSName.OFF))
                 {
                     return key.getName();
                 }

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=1679427&r1=1679426&r2=1679427&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
Thu May 14 18:39:53 2015
@@ -51,7 +51,7 @@ public abstract class PDChoice extends P
      */
     public PDChoice(PDAcroForm acroForm)
     {
-        super( acroForm );
+        super(acroForm);
         dictionary.setItem(COSName.FT, COSName.CH);
     }
 
@@ -320,7 +320,7 @@ public abstract class PDChoice extends P
      * @see #isSort()
      * @param sort The value for Sort.
      */
-    public void setSort( boolean sort )
+    public void setSort(boolean sort)
     {
         dictionary.setFlag(COSName.FF, FLAG_SORT, sort);
     }
@@ -340,7 +340,7 @@ public abstract class PDChoice extends P
      *
      * @param multiSelect The value for MultiSelect.
      */
-    public void setMultiSelect( boolean multiSelect )
+    public void setMultiSelect(boolean multiSelect)
     {
         dictionary.setFlag(COSName.FF, FLAG_MULTI_SELECT, multiSelect);
     }
@@ -360,7 +360,7 @@ public abstract class PDChoice extends P
      *
      * @param doNotSpellCheck The value for DoNotSpellCheck.
      */
-    public void setDoNotSpellCheck( boolean doNotSpellCheck )
+    public void setDoNotSpellCheck(boolean doNotSpellCheck)
     {
         dictionary.setFlag(COSName.FF, FLAG_DO_NOT_SPELL_CHECK, doNotSpellCheck);
     }
@@ -380,7 +380,7 @@ public abstract class PDChoice extends P
      *
      * @param commitOnSelChange The value for CommitOnSelChange.
      */
-    public void setCommitOnSelChange( boolean commitOnSelChange )
+    public void setCommitOnSelChange(boolean commitOnSelChange)
     {
         dictionary.setFlag(COSName.FF, FLAG_COMMIT_ON_SEL_CHANGE, commitOnSelChange);
     }
@@ -400,7 +400,7 @@ public abstract class PDChoice extends P
      *
      * @param combo The value for Combo.
      */
-    public void setCombo( boolean combo )
+    public void setCombo(boolean combo)
     {
         dictionary.setFlag(COSName.FF, FLAG_COMBO, combo);
     }
@@ -473,7 +473,7 @@ public abstract class PDChoice extends P
         {
             return COSArrayList.convertCOSStringCOSArrayToList((COSArray)value);
         }
-        return Collections.<String>emptyList();
+        return Collections.emptyList();
     }
     
     /**

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=1679427&r1=1679426&r2=1679427&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
Thu May 14 18:39:53 2015
@@ -36,7 +36,7 @@ public final class PDComboBox extends PD
      */
     public PDComboBox(PDAcroForm acroForm)
     {
-        super( acroForm );
+        super(acroForm);
         setCombo(true);
     }    
 
@@ -67,7 +67,7 @@ public final class PDComboBox extends PD
      *
      * @param edit The value for Edit.
      */
-    public void setEdit( boolean edit )
+    public void setEdit(boolean edit)
     {
         dictionary.setFlag(COSName.FF, FLAG_EDIT, edit);
     }

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=1679427&r1=1679426&r2=1679427&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
Thu May 14 18:39:53 2015
@@ -34,7 +34,7 @@ public final class PDListBox extends PDC
      */
     public PDListBox(PDAcroForm acroForm)
     {
-        super( acroForm );
+        super(acroForm);
     }
     
     /**

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDPushButton.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDPushButton.java?rev=1679427&r1=1679426&r2=1679427&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDPushButton.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDPushButton.java
Thu May 14 18:39:53 2015
@@ -36,7 +36,7 @@ public class PDPushButton extends PDButt
      */
     public PDPushButton(PDAcroForm acroForm)
     {
-        super( acroForm );
+        super(acroForm);
         setPushButton(true);
     }
     
@@ -47,7 +47,7 @@ public class PDPushButton extends PDButt
      * @param field the PDF object to represent as a field.
      * @param parent the parent node of the node
      */
-    PDPushButton( PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent)
+    PDPushButton(PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent)
     {
         super(acroForm, field, parent);
     }
@@ -71,7 +71,7 @@ public class PDPushButton extends PDButt
     @Override
     public List<String> getOptions()
     {
-        return Collections.<String>emptyList();
+        return Collections.emptyList();
     }
     
     @Override

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=1679427&r1=1679426&r2=1679427&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
Thu May 14 18:39:53 2015
@@ -45,7 +45,7 @@ public final class PDRadioButton extends
      */
     public PDRadioButton(PDAcroForm acroForm)
     {
-        super( acroForm );
+        super(acroForm);
         setRadioButton(true);
     }
     

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=1679427&r1=1679426&r2=1679427&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
Thu May 14 18:39:53 2015
@@ -71,7 +71,7 @@ public class PDSignatureField extends PD
         String fieldName = "Signature";
         Set<String> sigNames = new HashSet<String>();
         // fixme: this ignores non-terminal fields, so will miss any descendant signatures
-        for ( PDField field : acroForm.getFields() )
+        for (PDField field : acroForm.getFields())
         {
             if(field instanceof PDSignatureField)
             {
@@ -128,7 +128,7 @@ public class PDSignatureField extends PD
     public void setValue(String fieldValue)
     {
         // Signature fields don't support the strings for value
-        throw new IllegalArgumentException( "Signature fields don't support a string for
the value entry." );     
+        throw new IllegalArgumentException("Signature fields don't support a string for the
value entry.");     
     }    
     
     @Override
@@ -186,7 +186,7 @@ public class PDSignatureField extends PD
     public void setDefaultValue(String defaultValue)
     {
         // Signature fields don't support the "DV" entry.
-        throw new IllegalArgumentException( "Signature fields don't support the \"DV\" entry."
);     
+        throw new IllegalArgumentException("Signature fields don't support the \"DV\" entry.");
    
     }
 
     @Override

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=1679427&r1=1679426&r2=1679427&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
Thu May 14 18:39:53 2015
@@ -45,7 +45,7 @@ public final class PDTextField extends P
      */
     public PDTextField(PDAcroForm acroForm)
     {
-        super( acroForm );
+        super(acroForm);
         dictionary.setItem(COSName.FT, COSName.TX);
     }
 
@@ -58,7 +58,7 @@ public final class PDTextField extends P
      */
     PDTextField(PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent)
     {
-        super( acroForm, field, parent);
+        super(acroForm, field, parent);
     }
 
     /**
@@ -74,7 +74,7 @@ public final class PDTextField extends P
      *
      * @param multiline The value for the multiline.
      */
-    public void setMultiline( boolean multiline )
+    public void setMultiline(boolean multiline)
     {
         dictionary.setFlag(COSName.FF, FLAG_MULTILINE, multiline);
     }
@@ -92,7 +92,7 @@ public final class PDTextField extends P
      *
      * @param password The value for the password.
      */
-    public void setPassword( boolean password )
+    public void setPassword(boolean password)
     {
         dictionary.setFlag(COSName.FF, FLAG_PASSWORD, password);
     }
@@ -110,7 +110,7 @@ public final class PDTextField extends P
      *
      * @param fileSelect The value for the fileSelect.
      */
-    public void setFileSelect( boolean fileSelect )
+    public void setFileSelect(boolean fileSelect)
     {
         dictionary.setFlag(COSName.FF, FLAG_FILE_SELECT, fileSelect);
     }
@@ -128,7 +128,7 @@ public final class PDTextField extends P
      *
      * @param doNotSpellCheck The value for the doNotSpellCheck.
      */
-    public void setDoNotSpellCheck( boolean doNotSpellCheck )
+    public void setDoNotSpellCheck(boolean doNotSpellCheck)
     {
         dictionary.setFlag(COSName.FF, FLAG_DO_NOT_SPELL_CHECK, doNotSpellCheck);
     }
@@ -146,7 +146,7 @@ public final class PDTextField extends P
      *
      * @param doNotScroll The value for the doNotScroll.
      */
-    public void setDoNotScroll( boolean doNotScroll )
+    public void setDoNotScroll(boolean doNotScroll)
     {
         dictionary.setFlag(COSName.FF, FLAG_DO_NOT_SCROLL, doNotScroll);
     }
@@ -164,7 +164,7 @@ public final class PDTextField extends P
      *
      * @param comb The value for the comb.
      */
-    public void setComb( boolean comb )
+    public void setComb(boolean comb)
     {
         dictionary.setFlag(COSName.FF, FLAG_COMB, comb);
     }
@@ -182,7 +182,7 @@ public final class PDTextField extends P
      *
      * @param richText The value for the richText.
      */
-    public void setRichText( boolean richText )
+    public void setRichText(boolean richText)
     {
         dictionary.setFlag(COSName.FF, FLAG_RICH_TEXT, richText);
     }

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=1679427&r1=1679426&r2=1679427&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
Thu May 14 18:39:53 2015
@@ -42,7 +42,7 @@ public abstract class PDVariableText ext
      */
     PDVariableText(PDAcroForm acroForm)
     {
-        super( acroForm );
+        super(acroForm);
     }
 
     /**
@@ -54,7 +54,7 @@ public abstract class PDVariableText ext
      */
     PDVariableText(PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent)
     {
-        super( acroForm, field, parent);
+        super(acroForm, field, parent);
     }
 
     /**
@@ -144,9 +144,9 @@ public abstract class PDVariableText ext
     {
         int retval = 0;
 
-        COSNumber number = (COSNumber)getInheritableAttribute(COSName.Q );
+        COSNumber number = (COSNumber)getInheritableAttribute(COSName.Q);
         
-        if( number != null )
+        if (number != null)
         {
             retval = number.intValue();
         }
@@ -158,7 +158,7 @@ public abstract class PDVariableText ext
      *
      * @param q The new text justification.
      */
-    public void setQ( int q )
+    public void setQ(int q)
     {
         dictionary.setInt(COSName.Q, q);
     }



Mime
View raw message