Skip to content

Commit

Permalink
8254850: Update terminology in java.awt.GridBagLayout source code com…
Browse files Browse the repository at this point in the history
…ments

Reviewed-by: kcr, kizune
  • Loading branch information
prrace committed Dec 17, 2020
1 parent 7b05439 commit 9ed0b76
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/java.desktop/share/classes/java/awt/GridBagLayout.java
Expand Up @@ -1104,7 +1104,7 @@ else if (curY < 0) {
}


/* Cache the current slave's size. */
/* Cache the current child's size. */
if (sizeflag == PREFERREDSIZE)
d = comp.getPreferredSize();
else
Expand Down Expand Up @@ -1245,7 +1245,7 @@ else if (curY < 0) {
else if (constraints.gridwidth == 0 && curCol < 0)
curRow = curY + curHeight;

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

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

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

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

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

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

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

/*
* Pass #1: scan all the slaves to figure out the total amount
* Pass #1: scan all the children to figure out the total amount
* of space needed.
*/

Expand Down Expand Up @@ -2155,7 +2155,7 @@ protected void ArrangeGrid(Container parent) {
*/

/*
* Now do the actual layout of the slaves using the layout information
* Now do the actual layout of the children using the layout information
* that has been collected.
*/

Expand Down

1 comment on commit 9ed0b76

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.