File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed
test/jdk/java/awt/regtesthelpers Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -1107,11 +1107,45 @@ public Builder testTimeOut(long testTimeOut) {
11071107 return this ;
11081108 }
11091109
1110+ /**
1111+ * Sets the number of rows for displaying the instruction text.
1112+ * The default value is the number of lines in the text plus 1:
1113+ * {@code ((int) instructions.lines().count() + 1)}.
1114+ *
1115+ * @param rows the number of rows for instruction text
1116+ * @return this builder
1117+ */
11101118 public Builder rows (int rows ) {
11111119 this .rows = rows ;
11121120 return this ;
11131121 }
11141122
1123+ private int getDefaultRows () {
1124+ return (int ) instructions .lines ().count () + 1 ;
1125+ }
1126+
1127+ /**
1128+ * Adds a certain number of rows for displaying the instruction text.
1129+ *
1130+ * @param rowsAdd the number of rows to add to the number of rows
1131+ * @return this builder
1132+ * @see #rows
1133+ */
1134+ public Builder rowsAdd (int rowsAdd ) {
1135+ if (rows == 0 ) {
1136+ rows = getDefaultRows ();
1137+ }
1138+ rows += rowsAdd ;
1139+
1140+ return this ;
1141+ }
1142+
1143+ /**
1144+ * Sets the number of columns for displaying the instruction text.
1145+ *
1146+ * @param columns the number of columns for instruction text
1147+ * @return this builder
1148+ */
11151149 public Builder columns (int columns ) {
11161150 this .columns = columns ;
11171151 return this ;
@@ -1352,7 +1386,7 @@ private void validate() {
13521386 }
13531387
13541388 if (rows == 0 ) {
1355- rows = ROWS ;
1389+ rows = getDefaultRows () ;
13561390 }
13571391
13581392 if (columns == 0 ) {
You can’t perform that action at this time.
0 commit comments