Skip to content

Commit 44a2fc3

Browse files
Evgeniy prudnikovUbuntu
authored andcommitted
Add javadocs for several PdfFormField methods
DEVSIX-6063
1 parent 4f2479e commit 44a2fc3

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

forms/src/main/java/com/itextpdf/forms/fields/PdfFormField.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2020,6 +2020,12 @@ public PdfFormField setBorderWidth(float borderWidth) {
20202020
return this;
20212021
}
20222022

2023+
/**
2024+
* Sets the border style for the field.
2025+
*
2026+
* @param style the new border style.
2027+
* @return the edited field
2028+
*/
20232029
public PdfFormField setBorderStyle(PdfDictionary style) {
20242030
getWidgets().get(0).setBorderStyle(style);
20252031
regenerateField();
@@ -2275,10 +2281,21 @@ protected boolean isWrappedObjectMustBeIndirect() {
22752281
return true;
22762282
}
22772283

2284+
/**
2285+
* Gets the {@link PdfDocument} that owns that form field.
2286+
*
2287+
* @return the {@link PdfDocument} that owns that form field.
2288+
*/
22782289
protected PdfDocument getDocument() {
22792290
return getPdfObject().getIndirectReference().getDocument();
22802291
}
22812292

2293+
/**
2294+
* Gets a {@link Rectangle} that matches the current size and position of this form field.
2295+
*
2296+
* @param field current form field.
2297+
* @return a {@link Rectangle} that matches the current size and position of this form field.
2298+
*/
22822299
protected Rectangle getRect(PdfDictionary field) {
22832300
PdfArray rect = field.getAsArray(PdfName.Rect);
22842301
if (rect == null) {
@@ -2292,6 +2309,12 @@ protected Rectangle getRect(PdfDictionary field) {
22922309
return rect != null ? rect.toRectangle() : null;
22932310
}
22942311

2312+
/**
2313+
* Convert {@link String} multidimensional array of combo box or list options to {@link PdfArray}.
2314+
*
2315+
* @param options Two-dimensional array of options.
2316+
* @return a {@link PdfArray} that contains all the options.
2317+
*/
22952318
protected static PdfArray processOptions(String[][] options) {
22962319
PdfArray array = new PdfArray();
22972320
for (String[] option : options) {
@@ -2302,6 +2325,12 @@ protected static PdfArray processOptions(String[][] options) {
23022325
return array;
23032326
}
23042327

2328+
/**
2329+
* Convert {@link String} array of combo box or list options to {@link PdfArray}.
2330+
*
2331+
* @param options array of options.
2332+
* @return a {@link PdfArray} that contains all the options.
2333+
*/
23052334
protected static PdfArray processOptions(String[] options) {
23062335
PdfArray array = new PdfArray();
23072336
for (String option : options) {

0 commit comments

Comments
 (0)