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 2018/02/02 17:48:29 UTC
svn commit: r1822992 - in
/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation:
PDAnnotationCaret.java PDAnnotationFreeText.java
PDAnnotationSquareCircle.java
Author: msahyoun
Date: Fri Feb 2 17:48:29 2018
New Revision: 1822992
URL: http://svn.apache.org/viewvc?rev=1822992&view=rev
Log:
PDFBOX-4092: enhance parameter names, fix javadoc
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationCaret.java
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFreeText.java
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationCaret.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationCaret.java?rev=1822992&r1=1822991&r2=1822992&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationCaret.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationCaret.java Fri Feb 2 17:48:29 2018
@@ -53,30 +53,34 @@ public class PDAnnotationCaret extends P
}
/**
- * This will set the margin between the annotations "outer" rectangle defined by
- * /Rect and the boundaries of the underlying caret.
+ * This will set the difference between the annotations "outer" rectangle defined by
+ * /Rect and boundaries of the underlying.
*
- * <p>This will set an equal offset for all sides</p>
+ * <p>This will set an equal difference for all sides</p>
*
- * @param differences from the annotations /Rect entry
+ * @param difference from the annotations /Rect entry
*/
- public void setRectDifferences(float margin) {
- setRectDifferences(margin, margin, margin, margin);
+ public void setRectDifferences(float difference) {
+ setRectDifferences(difference, difference, difference, difference);
}
/**
- * This will set the margin between the annotations "outer" rectangle defined by
- * /Rect and the boundaries of the underlying caret.
+ * This will set the difference between the annotations "outer" rectangle defined by
+ * /Rect and the border.
+ *
+ * @param differenceLeft left difference from the annotations /Rect entry
+ * @param differenceTop top difference from the annotations /Rect entry
+ * @param differenceRight right difference from the annotations /Rect entry
+ * @param differenceBottom bottom difference from the annotations /Rect entry
*
- * @param differences from the annotations /Rect entry
*/
- public void setRectDifferences(float marginLeft, float marginTop, float marginRight, float marginBottom)
+ public void setRectDifferences(float differenceLeft, float differenceTop, float differenceRight, float differenceBottom)
{
COSArray margins = new COSArray();
- margins.add(new COSFloat(marginLeft));
- margins.add(new COSFloat(marginTop));
- margins.add(new COSFloat(marginRight));
- margins.add(new COSFloat(marginBottom));
+ margins.add(new COSFloat(differenceLeft));
+ margins.add(new COSFloat(differenceTop));
+ margins.add(new COSFloat(differenceRight));
+ margins.add(new COSFloat(differenceBottom));
getCOSObject().setItem(COSName.RD, margins);
}
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFreeText.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFreeText.java?rev=1822992&r1=1822991&r2=1822992&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFreeText.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFreeText.java Fri Feb 2 17:48:29 2018
@@ -124,30 +124,34 @@ public class PDAnnotationFreeText extend
}
/**
- * This will set the margin between the annotations "outer" rectangle defined by
+ * This will set the difference between the annotations "outer" rectangle defined by
* /Rect and the border.
*
- * <p>This will set an equal offset for all sides</p>
+ * <p>This will set an equal difference for all sides</p>
*
- * @param differences from the annotations /Rect entry
+ * @param difference from the annotations /Rect entry
*/
- public void setRectDifferences(float margin) {
- setRectDifferences(margin, margin, margin, margin);
+ public void setRectDifferences(float difference) {
+ setRectDifferences(difference, difference, difference, difference);
}
/**
- * This will set the margin between the annotations "outer" rectangle defined by
+ * This will set the difference between the annotations "outer" rectangle defined by
* /Rect and the border.
*
- * @param differences from the annotations /Rect entry
+ * @param differenceLeft left difference from the annotations /Rect entry
+ * @param differenceTop top difference from the annotations /Rect entry
+ * @param differenceRight right difference from the annotations /Rect entry
+ * @param differenceBottom bottom difference from the annotations /Rect entry
+ *
*/
- public void setRectDifferences(float marginLeft, float marginTop, float marginRight, float marginBottom)
+ public void setRectDifferences(float differenceLeft, float differenceTop, float differenceRight, float differenceBottom)
{
COSArray margins = new COSArray();
- margins.add(new COSFloat(marginLeft));
- margins.add(new COSFloat(marginTop));
- margins.add(new COSFloat(marginRight));
- margins.add(new COSFloat(marginBottom));
+ margins.add(new COSFloat(differenceLeft));
+ margins.add(new COSFloat(differenceTop));
+ margins.add(new COSFloat(differenceRight));
+ margins.add(new COSFloat(differenceBottom));
getCOSObject().setItem(COSName.RD, margins);
}
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java?rev=1822992&r1=1822991&r2=1822992&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java Fri Feb 2 17:48:29 2018
@@ -188,35 +188,39 @@ public abstract class PDAnnotationSquare
}
/**
- * This will set the margin between the annotations "outer" rectangle defined by
+ * This will set the difference between the annotations "outer" rectangle defined by
* /Rect and the border.
*
- * <p>This will set an equal offset for all sides</p>
+ * <p>This will set an equal difference for all sides</p>
*
- * @param differences from the annotations /Rect entry
+ * @param difference from the annotations /Rect entry
*/
- public void setRectDifferences(float margin) {
- setRectDifferences(margin, margin, margin, margin);
+ public void setRectDifferences(float difference) {
+ setRectDifferences(difference, difference, difference, difference);
}
/**
- * This will set the margin between the annotations "outer" rectangle defined by
+ * This will set the difference between the annotations "outer" rectangle defined by
* /Rect and the border.
*
- * @param differences from the annotations /Rect entry
+ * @param differenceLeft left difference from the annotations /Rect entry
+ * @param differenceTop top difference from the annotations /Rect entry
+ * @param differenceRight right difference from the annotations /Rect entry
+ * @param differenceBottom bottom difference from the annotations /Rect entry
+ *
*/
- public void setRectDifferences(float marginLeft, float marginTop, float marginRight, float marginBottom)
+ public void setRectDifferences(float differenceLeft, float differenceTop, float differenceRight, float differenceBottom)
{
COSArray margins = new COSArray();
- margins.add(new COSFloat(marginLeft));
- margins.add(new COSFloat(marginTop));
- margins.add(new COSFloat(marginRight));
- margins.add(new COSFloat(marginBottom));
+ margins.add(new COSFloat(differenceLeft));
+ margins.add(new COSFloat(differenceTop));
+ margins.add(new COSFloat(differenceRight));
+ margins.add(new COSFloat(differenceBottom));
getCOSObject().setItem(COSName.RD, margins);
}
/**
- * This will get the margin between the annotations "outer" rectangle defined by
+ * This will get the differences between the annotations "outer" rectangle defined by
* /Rect and the border.
*
* @return the differences. If the entry hasn't been set am empty array is returned.