Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jdk17u
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
einsteinathome
openjdk
jdk17u
Commits
17f35ba1
Commit
17f35ba1
authored
7 months ago
by
Goetz Lindenmaier
Browse files
Options
Downloads
Patches
Plain Diff
8340308: PassFailJFrame: Make rows default to number of lines in instructions
Backport-of: d1d824008d1dc70029013820814fd03c40b4e309
parent
5e3c5d99
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/jdk/java/awt/regtesthelpers/PassFailJFrame.java
+35
-1
35 additions, 1 deletion
test/jdk/java/awt/regtesthelpers/PassFailJFrame.java
with
35 additions
and
1 deletion
test/jdk/java/awt/regtesthelpers/PassFailJFrame.java
+
35
−
1
View file @
17f35ba1
...
...
@@ -1184,11 +1184,45 @@ public final class PassFailJFrame {
return
this
;
}
/**
* Sets the number of rows for displaying the instruction text.
* The default value is the number of lines in the text plus 1:
* {@code ((int) instructions.lines().count() + 1)}.
*
* @param rows the number of rows for instruction text
* @return this builder
*/
public
Builder
rows
(
int
rows
)
{
this
.
rows
=
rows
;
return
this
;
}
private
int
getDefaultRows
()
{
return
(
int
)
instructions
.
lines
().
count
()
+
1
;
}
/**
* Adds a certain number of rows for displaying the instruction text.
*
* @param rowsAdd the number of rows to add to the number of rows
* @return this builder
* @see #rows
*/
public
Builder
rowsAdd
(
int
rowsAdd
)
{
if
(
rows
==
0
)
{
rows
=
getDefaultRows
();
}
rows
+=
rowsAdd
;
return
this
;
}
/**
* Sets the number of columns for displaying the instruction text.
*
* @param columns the number of columns for instruction text
* @return this builder
*/
public
Builder
columns
(
int
columns
)
{
this
.
columns
=
columns
;
return
this
;
...
...
@@ -1483,7 +1517,7 @@ public final class PassFailJFrame {
}
if
(
rows
==
0
)
{
rows
=
ROWS
;
rows
=
getDefaultRows
()
;
}
if
(
columns
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment