You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2019/05/16 17:49:31 UTC
svn commit: r1859400 - in
/pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/interactive/form:
CreateCheckBox.java CreateRadioButtons.java
Author: tilman
Date: Thu May 16 17:49:31 2019
New Revision: 1859400
URL: http://svn.apache.org/viewvc?rev=1859400&view=rev
Log:
PDFBOX-4071: correct confusing method name
Modified:
pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/interactive/form/CreateCheckBox.java
pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/interactive/form/CreateRadioButtons.java
Modified: pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/interactive/form/CreateCheckBox.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/interactive/form/CreateCheckBox.java?rev=1859400&r1=1859399&r2=1859400&view=diff
==============================================================================
--- pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/interactive/form/CreateCheckBox.java (original)
+++ pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/interactive/form/CreateCheckBox.java Thu May 16 17:49:31 2019
@@ -90,8 +90,8 @@ public class CreateCheckBox
PDAppearanceEntry normalAppearance = ap.getNormalAppearance();
COSDictionary normalAppearanceDict = (COSDictionary) normalAppearance.getCOSObject();
- normalAppearanceDict.setItem(COSName.Off, createRadioButtonAppearanceStream(document, widget, false));
- normalAppearanceDict.setItem(COSName.YES, createRadioButtonAppearanceStream(document, widget, true));
+ normalAppearanceDict.setItem(COSName.Off, createAppearanceStream(document, widget, false));
+ normalAppearanceDict.setItem(COSName.YES, createAppearanceStream(document, widget, true));
// If we ever decide to implement a /D (down) appearance, just
// replace the background colors c with c * 0.75
@@ -104,7 +104,7 @@ public class CreateCheckBox
document.close();
}
- private static PDAppearanceStream createRadioButtonAppearanceStream(
+ private static PDAppearanceStream createAppearanceStream(
final PDDocument document, PDAnnotationWidget widget, boolean on) throws IOException
{
PDRectangle rect = widget.getRectangle();
Modified: pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/interactive/form/CreateRadioButtons.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/interactive/form/CreateRadioButtons.java?rev=1859400&r1=1859399&r2=1859400&view=diff
==============================================================================
--- pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/interactive/form/CreateRadioButtons.java (original)
+++ pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/interactive/form/CreateRadioButtons.java Thu May 16 17:49:31 2019
@@ -86,8 +86,8 @@ public class CreateRadioButtons
widget.setPage(page);
COSDictionary apNDict = new COSDictionary();
- apNDict.setItem(COSName.Off, createCheckBoxAppearanceStream(document, widget, false));
- apNDict.setItem(options.get(i), createCheckBoxAppearanceStream(document, widget, true));
+ apNDict.setItem(COSName.Off, createAppearanceStream(document, widget, false));
+ apNDict.setItem(options.get(i), createAppearanceStream(document, widget, true));
PDAppearanceDictionary appearance = new PDAppearanceDictionary();
PDAppearanceEntry appearanceNEntry = new PDAppearanceEntry(apNDict);
@@ -119,7 +119,7 @@ public class CreateRadioButtons
document.close();
}
- private static PDAppearanceStream createCheckBoxAppearanceStream(
+ private static PDAppearanceStream createAppearanceStream(
final PDDocument document, PDAnnotationWidget widget, boolean on) throws IOException
{
PDRectangle rect = widget.getRectangle();