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 15:41:48 UTC
svn commit: r1822976 - 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 15:41:48 2018
New Revision: 1822976
URL: http://svn.apache.org/viewvc?rev=1822976&view=rev
Log:
PDFBOX-4092: better align naming of methods with PDF specification
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=1822976&r1=1822975&r2=1822976&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 15:41:48 2018
@@ -56,19 +56,21 @@ 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.
*
- * @param margin
+ * <p>This will set an equal offset for all sides</p>
+ *
+ * @param differences from the annotations /Rect entry
*/
- public void setMargins(float margin) {
- setMargins(margin, margin, margin, margin);
+ public void setRectDifferences(float margin) {
+ setRectDifferences(margin, margin, margin, margin);
}
/**
* This will set the margin between the annotations "outer" rectangle defined by
* /Rect and the boundaries of the underlying caret.
*
- * @param margin
+ * @param differences from the annotations /Rect entry
*/
- public void setMargins(float marginLeft, float marginTop, float marginRight, float marginBottom)
+ public void setRectDifferences(float marginLeft, float marginTop, float marginRight, float marginBottom)
{
COSArray margins = new COSArray();
margins.add(new COSFloat(marginLeft));
@@ -82,9 +84,9 @@ public class PDAnnotationCaret extends P
* This will get the margin between the annotations "outer" rectangle defined by
* /Rect and the boundaries of the underlying caret.
*
- * @return the margins. If the entry hasn't been set am empty array is returned.
+ * @return the differences. If the entry hasn't been set am empty array is returned.
*/
- public float[] getMargins()
+ public float[] getRectDifferences()
{
COSBase margin = getCOSObject().getItem(COSName.RD);
if (margin instanceof COSArray)
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=1822976&r1=1822975&r2=1822976&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 15:41:48 2018
@@ -127,19 +127,21 @@ public class PDAnnotationFreeText extend
* This will set the margin between the annotations "outer" rectangle defined by
* /Rect and the border.
*
- * @param margin
+ * <p>This will set an equal offset for all sides</p>
+ *
+ * @param differences from the annotations /Rect entry
*/
- public void setMargins(float margin) {
- setMargins(margin, margin, margin, margin);
+ public void setRectDifferences(float margin) {
+ setRectDifferences(margin, margin, margin, margin);
}
/**
* This will set the margin between the annotations "outer" rectangle defined by
* /Rect and the border.
*
- * @param margin
+ * @param differences from the annotations /Rect entry
*/
- public void setMargins(float marginLeft, float marginTop, float marginRight, float marginBottom)
+ public void setRectDifferences(float marginLeft, float marginTop, float marginRight, float marginBottom)
{
COSArray margins = new COSArray();
margins.add(new COSFloat(marginLeft));
@@ -153,9 +155,9 @@ public class PDAnnotationFreeText extend
* This will get the margin between the annotations "outer" rectangle defined by
* /Rect and the border.
*
- * @return the margins. If the entry hasn't been set am empty array is returned.
+ * @return the differences. If the entry hasn't been set am empty array is returned.
*/
- public float[] getMargins()
+ public float[] getRectDifferences()
{
COSBase margin = getCOSObject().getItem(COSName.RD);
if (margin instanceof COSArray)
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=1822976&r1=1822975&r2=1822976&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 15:41:48 2018
@@ -191,19 +191,21 @@ public abstract class PDAnnotationSquare
* This will set the margin between the annotations "outer" rectangle defined by
* /Rect and the border.
*
- * @param margin
+ * <p>This will set an equal offset for all sides</p>
+ *
+ * @param differences from the annotations /Rect entry
*/
- public void setMargins(float margin) {
- setMargins(margin, margin, margin, margin);
+ public void setRectDifferences(float margin) {
+ setRectDifferences(margin, margin, margin, margin);
}
/**
* This will set the margin between the annotations "outer" rectangle defined by
* /Rect and the border.
*
- * @param margin
+ * @param differences from the annotations /Rect entry
*/
- public void setMargins(float marginLeft, float marginTop, float marginRight, float marginBottom)
+ public void setRectDifferences(float marginLeft, float marginTop, float marginRight, float marginBottom)
{
COSArray margins = new COSArray();
margins.add(new COSFloat(marginLeft));
@@ -217,9 +219,9 @@ public abstract class PDAnnotationSquare
* This will get the margin between the annotations "outer" rectangle defined by
* /Rect and the border.
*
- * @return the margins. If the entry hasn't been set am empty array is returned.
+ * @return the differences. If the entry hasn't been set am empty array is returned.
*/
- public float[] getMargins()
+ public float[] getRectDifferences()
{
COSBase margin = getCOSObject().getItem(COSName.RD);
if (margin instanceof COSArray)