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

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -979,13 +979,19 @@
 
     /**
      * This method is obsolete and supplied for backwards
      * compatibility only; new code should call {@link
      * #getLayoutInfo(java.awt.Container, int) getLayoutInfo} instead.
-     * This method is the same as <code>getLayoutInfo</code>;
-     * refer to <code>getLayoutInfo</code> for details on parameters
-     * and return value.
+     *
+     * Fills in an instance of {@code GridBagLayoutInfo} for the
+     * current set of managed children. This method is the same
+     * as {@code getLayoutInfo}; refer to {@code getLayoutInfo}
+     * description for details.
+     *
+     * @param  parent the layout container
+     * @param  sizeflag either {@code PREFERREDSIZE} or {@code MINSIZE}
+     * @return the {@code GridBagLayoutInfo} for the set of children
      */
     protected GridBagLayoutInfo GetLayoutInfo(Container parent, int sizeflag) {
         synchronized (parent.getTreeLock()) {
             GridBagLayoutInfo r;
             Component comp;

@@ -1609,17 +1615,21 @@
                                     Rectangle r) {
         AdjustForGravity(constraints, r);
     }
 
     /**
+     * Adjusts the x, y, width, and height fields to the correct
+     * values depending on the constraint geometry and pads.
+     * <p>
      * This method is obsolete and supplied for backwards
      * compatibility only; new code should call {@link
      * #adjustForGravity(java.awt.GridBagConstraints, java.awt.Rectangle)
      * adjustForGravity} instead.
-     * This method is the same as <code>adjustForGravity</code>;
-     * refer to <code>adjustForGravity</code> for details
-     * on parameters.
+     * This method is the same as <code>adjustForGravity</code>
+     *
+     * @param  constraints the constraints to be applied
+     * @param  r the {@code Rectangle} to be adjusted
      */
     protected void AdjustForGravity(GridBagConstraints constraints,
                                     Rectangle r) {
         int diffx, diffy;
         int cellY = r.y;

@@ -1993,13 +2003,16 @@
 
     /**
      * This method is obsolete and supplied for backwards
      * compatibility only; new code should call {@link
      * #getMinSize(java.awt.Container, GridBagLayoutInfo) getMinSize} instead.
-     * This method is the same as <code>getMinSize</code>;
-     * refer to <code>getMinSize</code> for details on parameters
-     * and return value.
+     * This method is the same as <code>getMinSize</code>
+     *
+     * @param  parent the layout container
+     * @param  info the layout info for this parent
+     * @return a <code>Dimension</code> object containing the
+     *         minimum size
      */
     protected Dimension GetMinSize(Container parent, GridBagLayoutInfo info) {
         Dimension d = new Dimension();
         int i, t;
         Insets insets = parent.getInsets();

@@ -2033,13 +2046,13 @@
 
     /**
      * This method is obsolete and supplied for backwards
      * compatibility only; new code should call {@link
      * #arrangeGrid(Container) arrangeGrid} instead.
-     * This method is the same as <code>arrangeGrid</code>;
-     * refer to <code>arrangeGrid</code> for details on the
-     * parameter.
+     * This method is the same as <code>arrangeGrid</code>
+     *
+     * @param  parent the layout container
      */
     protected void ArrangeGrid(Container parent) {
         Component comp;
         int compindex;
         GridBagConstraints constraints;