Skip to content

Commit b1e6377

Browse files
committed
8254850: Update terminology in java.awt.GridBagLayout source code comments
Backport-of: 9ed0b76
1 parent b11ac53 commit b1e6377

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/java.desktop/share/classes/java/awt/GridBagLayout.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ else if (curY < 0) {
11221122
}
11231123

11241124

1125-
/* Cache the current slave's size. */
1125+
/* Cache the current child's size. */
11261126
if (sizeflag == PREFERREDSIZE)
11271127
d = comp.getPreferredSize();
11281128
else
@@ -1263,7 +1263,7 @@ else if (curY < 0) {
12631263
else if (constraints.gridwidth == 0 && curCol < 0)
12641264
curRow = curY + curHeight;
12651265

1266-
/* Assign the new values to the gridbag slave */
1266+
/* Assign the new values to the gridbag child */
12671267
constraints.tempX = curX;
12681268
constraints.tempY = curY;
12691269
constraints.tempWidth = curWidth;
@@ -1382,7 +1382,7 @@ else if (constraints.gridwidth == 0 && curCol < 0)
13821382
px = constraints.tempX + constraints.tempWidth; /* right column */
13831383

13841384
/*
1385-
* Figure out if we should use this slave\'s weight. If the weight
1385+
* Figure out if we should use this child's weight. If the weight
13861386
* is less than the total weight spanned by the width of the cell,
13871387
* then discard the weight. Otherwise split the difference
13881388
* according to the existing weights.
@@ -1408,7 +1408,7 @@ else if (constraints.gridwidth == 0 && curCol < 0)
14081408

14091409
/*
14101410
* Calculate the minWidth array values.
1411-
* First, figure out how wide the current slave needs to be.
1411+
* First, figure out how wide the current child needs to be.
14121412
* Then, see if it will fit within the current minWidth values.
14131413
* If it will not fit, add the difference according to the
14141414
* weightX array.
@@ -1443,7 +1443,7 @@ else if (constraints.tempWidth > i && constraints.tempWidth < nextSize)
14431443
py = constraints.tempY + constraints.tempHeight; /* bottom row */
14441444

14451445
/*
1446-
* Figure out if we should use this slave's weight. If the weight
1446+
* Figure out if we should use this child's weight. If the weight
14471447
* is less than the total weight spanned by the height of the cell,
14481448
* then discard the weight. Otherwise split it the difference
14491449
* according to the existing weights.
@@ -1469,7 +1469,7 @@ else if (constraints.tempWidth > i && constraints.tempWidth < nextSize)
14691469

14701470
/*
14711471
* Calculate the minHeight array values.
1472-
* First, figure out how tall the current slave needs to be.
1472+
* First, figure out how tall the current child needs to be.
14731473
* Then, see if it will fit within the current minHeight values.
14741474
* If it will not fit, add the difference according to the
14751475
* weightY array.
@@ -1993,7 +1993,7 @@ private void centerVertically(GridBagConstraints cons, Rectangle r,
19931993

19941994
/**
19951995
* Figures out the minimum size of the
1996-
* master based on the information from {@code getLayoutInfo}.
1996+
* parent based on the information from {@code getLayoutInfo}.
19971997
* This method should only be used internally by
19981998
* {@code GridBagLayout}.
19991999
*
@@ -2073,7 +2073,7 @@ protected void ArrangeGrid(Container parent) {
20732073
rightToLeft = !parent.getComponentOrientation().isLeftToRight();
20742074

20752075
/*
2076-
* If the parent has no slaves anymore, then don't do anything
2076+
* If the parent has no children anymore, then don't do anything
20772077
* at all: just leave the parent's size as-is.
20782078
*/
20792079
if (components.length == 0 &&
@@ -2083,7 +2083,7 @@ protected void ArrangeGrid(Container parent) {
20832083
}
20842084

20852085
/*
2086-
* Pass #1: scan all the slaves to figure out the total amount
2086+
* Pass #1: scan all the children to figure out the total amount
20872087
* of space needed.
20882088
*/
20892089

@@ -2173,7 +2173,7 @@ protected void ArrangeGrid(Container parent) {
21732173
*/
21742174

21752175
/*
2176-
* Now do the actual layout of the slaves using the layout information
2176+
* Now do the actual layout of the children using the layout information
21772177
* that has been collected.
21782178
*/
21792179

0 commit comments

Comments
 (0)