Skip to content

Commit 9ed0b76

Browse files
committed
8254850: Update terminology in java.awt.GridBagLayout source code comments
Reviewed-by: kcr, kizune
1 parent 7b05439 commit 9ed0b76

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
@@ -1104,7 +1104,7 @@ else if (curY < 0) {
11041104
}
11051105

11061106

1107-
/* Cache the current slave's size. */
1107+
/* Cache the current child's size. */
11081108
if (sizeflag == PREFERREDSIZE)
11091109
d = comp.getPreferredSize();
11101110
else
@@ -1245,7 +1245,7 @@ else if (curY < 0) {
12451245
else if (constraints.gridwidth == 0 && curCol < 0)
12461246
curRow = curY + curHeight;
12471247

1248-
/* Assign the new values to the gridbag slave */
1248+
/* Assign the new values to the gridbag child */
12491249
constraints.tempX = curX;
12501250
constraints.tempY = curY;
12511251
constraints.tempWidth = curWidth;
@@ -1364,7 +1364,7 @@ else if (constraints.gridwidth == 0 && curCol < 0)
13641364
px = constraints.tempX + constraints.tempWidth; /* right column */
13651365

13661366
/*
1367-
* Figure out if we should use this slave\'s weight. If the weight
1367+
* Figure out if we should use this child's weight. If the weight
13681368
* is less than the total weight spanned by the width of the cell,
13691369
* then discard the weight. Otherwise split the difference
13701370
* according to the existing weights.
@@ -1390,7 +1390,7 @@ else if (constraints.gridwidth == 0 && curCol < 0)
13901390

13911391
/*
13921392
* Calculate the minWidth array values.
1393-
* First, figure out how wide the current slave needs to be.
1393+
* First, figure out how wide the current child needs to be.
13941394
* Then, see if it will fit within the current minWidth values.
13951395
* If it will not fit, add the difference according to the
13961396
* weightX array.
@@ -1425,7 +1425,7 @@ else if (constraints.tempWidth > i && constraints.tempWidth < nextSize)
14251425
py = constraints.tempY + constraints.tempHeight; /* bottom row */
14261426

14271427
/*
1428-
* Figure out if we should use this slave's weight. If the weight
1428+
* Figure out if we should use this child's weight. If the weight
14291429
* is less than the total weight spanned by the height of the cell,
14301430
* then discard the weight. Otherwise split it the difference
14311431
* according to the existing weights.
@@ -1451,7 +1451,7 @@ else if (constraints.tempWidth > i && constraints.tempWidth < nextSize)
14511451

14521452
/*
14531453
* Calculate the minHeight array values.
1454-
* First, figure out how tall the current slave needs to be.
1454+
* First, figure out how tall the current child needs to be.
14551455
* Then, see if it will fit within the current minHeight values.
14561456
* If it will not fit, add the difference according to the
14571457
* weightY array.
@@ -1975,7 +1975,7 @@ private void centerVertically(GridBagConstraints cons, Rectangle r,
19751975

19761976
/**
19771977
* Figures out the minimum size of the
1978-
* master based on the information from {@code getLayoutInfo}.
1978+
* parent based on the information from {@code getLayoutInfo}.
19791979
* This method should only be used internally by
19801980
* {@code GridBagLayout}.
19811981
*
@@ -2055,7 +2055,7 @@ protected void ArrangeGrid(Container parent) {
20552055
rightToLeft = !parent.getComponentOrientation().isLeftToRight();
20562056

20572057
/*
2058-
* If the parent has no slaves anymore, then don't do anything
2058+
* If the parent has no children anymore, then don't do anything
20592059
* at all: just leave the parent's size as-is.
20602060
*/
20612061
if (components.length == 0 &&
@@ -2065,7 +2065,7 @@ protected void ArrangeGrid(Container parent) {
20652065
}
20662066

20672067
/*
2068-
* Pass #1: scan all the slaves to figure out the total amount
2068+
* Pass #1: scan all the children to figure out the total amount
20692069
* of space needed.
20702070
*/
20712071

@@ -2155,7 +2155,7 @@ protected void ArrangeGrid(Container parent) {
21552155
*/
21562156

21572157
/*
2158-
* Now do the actual layout of the slaves using the layout information
2158+
* Now do the actual layout of the children using the layout information
21592159
* that has been collected.
21602160
*/
21612161

0 commit comments

Comments
 (0)