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 @@ -1184,11 +1184,45 @@ public Builder testTimeOut(long testTimeOut) {
11841184 return this ;
11851185 }
11861186
1187+ /**
1188+ * Sets the number of rows for displaying the instruction text.
1189+ * The default value is the number of lines in the text plus 1:
1190+ * {@code ((int) instructions.lines().count() + 1)}.
1191+ *
1192+ * @param rows the number of rows for instruction text
1193+ * @return this builder
1194+ */
11871195 public Builder rows (int rows ) {
11881196 this .rows = rows ;
11891197 return this ;
11901198 }
11911199
1200+ private int getDefaultRows () {
1201+ return (int ) instructions .lines ().count () + 1 ;
1202+ }
1203+
1204+ /**
1205+ * Adds a certain number of rows for displaying the instruction text.
1206+ *
1207+ * @param rowsAdd the number of rows to add to the number of rows
1208+ * @return this builder
1209+ * @see #rows
1210+ */
1211+ public Builder rowsAdd (int rowsAdd ) {
1212+ if (rows == 0 ) {
1213+ rows = getDefaultRows ();
1214+ }
1215+ rows += rowsAdd ;
1216+
1217+ return this ;
1218+ }
1219+
1220+ /**
1221+ * Sets the number of columns for displaying the instruction text.
1222+ *
1223+ * @param columns the number of columns for instruction text
1224+ * @return this builder
1225+ */
11921226 public Builder columns (int columns ) {
11931227 this .columns = columns ;
11941228 return this ;
@@ -1483,7 +1517,7 @@ private void validate() {
14831517 }
14841518
14851519 if (rows == 0 ) {
1486- rows = ROWS ;
1520+ rows = getDefaultRows () ;
14871521 }
14881522
14891523 if (columns == 0 ) {
You can’t perform that action at this time.
0 commit comments