@@ -2020,6 +2020,12 @@ public PdfFormField setBorderWidth(float borderWidth) {
2020
2020
return this ;
2021
2021
}
2022
2022
2023
+ /**
2024
+ * Sets the border style for the field.
2025
+ *
2026
+ * @param style the new border style.
2027
+ * @return the edited field
2028
+ */
2023
2029
public PdfFormField setBorderStyle (PdfDictionary style ) {
2024
2030
getWidgets ().get (0 ).setBorderStyle (style );
2025
2031
regenerateField ();
@@ -2275,10 +2281,21 @@ protected boolean isWrappedObjectMustBeIndirect() {
2275
2281
return true ;
2276
2282
}
2277
2283
2284
+ /**
2285
+ * Gets the {@link PdfDocument} that owns that form field.
2286
+ *
2287
+ * @return the {@link PdfDocument} that owns that form field.
2288
+ */
2278
2289
protected PdfDocument getDocument () {
2279
2290
return getPdfObject ().getIndirectReference ().getDocument ();
2280
2291
}
2281
2292
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
+ */
2282
2299
protected Rectangle getRect (PdfDictionary field ) {
2283
2300
PdfArray rect = field .getAsArray (PdfName .Rect );
2284
2301
if (rect == null ) {
@@ -2292,6 +2309,12 @@ protected Rectangle getRect(PdfDictionary field) {
2292
2309
return rect != null ? rect .toRectangle () : null ;
2293
2310
}
2294
2311
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
+ */
2295
2318
protected static PdfArray processOptions (String [][] options ) {
2296
2319
PdfArray array = new PdfArray ();
2297
2320
for (String [] option : options ) {
@@ -2302,6 +2325,12 @@ protected static PdfArray processOptions(String[][] options) {
2302
2325
return array ;
2303
2326
}
2304
2327
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
+ */
2305
2334
protected static PdfArray processOptions (String [] options ) {
2306
2335
PdfArray array = new PdfArray ();
2307
2336
for (String option : options ) {
0 commit comments