< prev index next >

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

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2019, 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

@@ -114,68 +114,51 @@
  * <dd>Specifies the component's external padding, the minimum
  * amount of space between the component and the edges of its display area.
  * <dt>{@link GridBagConstraints#anchor}
  * <dd>Specifies where the component should be positioned in its display area.
  * There are three kinds of possible values: absolute, orientation-relative,
- * and baseline-relative
+ * and baseline-relative.
  * Orientation relative values are interpreted relative to the container's
  * {@code ComponentOrientation} property while absolute values
  * are not.  Baseline relative values are calculated relative to the
  * baseline.  Valid values are:
  *
- * <table class="striped" style="margin: 0px auto">
- * <caption>Absolute, relative and baseline values as described above</caption>
- * <thead>
- * <tr>
- * <th><p style="text-align:center">Absolute Values</th>
- * <th><p style="text-align:center">Orientation Relative Values</th>
- * <th><p style="text-align:center">Baseline Relative Values</th>
- * </tr>
- * </thead>
- * <tbody>
- * <tr>
- * <td>
- * <ul style="list-style-type:none">
+ * <p>Absolute Values:
+ * <ul>
  * <li>{@code GridBagConstraints.NORTH}</li>
  * <li>{@code GridBagConstraints.SOUTH}</li>
  * <li>{@code GridBagConstraints.WEST}</li>
  * <li>{@code GridBagConstraints.EAST}</li>
  * <li>{@code GridBagConstraints.NORTHWEST}</li>
  * <li>{@code GridBagConstraints.NORTHEAST}</li>
  * <li>{@code GridBagConstraints.SOUTHWEST}</li>
  * <li>{@code GridBagConstraints.SOUTHEAST}</li>
  * <li>{@code GridBagConstraints.CENTER} (the default)</li>
  * </ul>
- * </td>
- * <td>
- * <ul style="list-style-type:none">
+ * <p>Orientation Relative Values:
+ * <ul>
  * <li>{@code GridBagConstraints.PAGE_START}</li>
  * <li>{@code GridBagConstraints.PAGE_END}</li>
  * <li>{@code GridBagConstraints.LINE_START}</li>
  * <li>{@code GridBagConstraints.LINE_END}</li>
  * <li>{@code GridBagConstraints.FIRST_LINE_START}</li>
  * <li>{@code GridBagConstraints.FIRST_LINE_END}</li>
  * <li>{@code GridBagConstraints.LAST_LINE_START}</li>
  * <li>{@code GridBagConstraints.LAST_LINE_END}</li>
  * </ul>
- * </td>
- * <td>
- * <ul style="list-style-type:none">
+ * <p>Baseline Relative Values:
+ * <ul>
  * <li>{@code GridBagConstraints.BASELINE}</li>
  * <li>{@code GridBagConstraints.BASELINE_LEADING}</li>
  * <li>{@code GridBagConstraints.BASELINE_TRAILING}</li>
  * <li>{@code GridBagConstraints.ABOVE_BASELINE}</li>
  * <li>{@code GridBagConstraints.ABOVE_BASELINE_LEADING}</li>
  * <li>{@code GridBagConstraints.ABOVE_BASELINE_TRAILING}</li>
  * <li>{@code GridBagConstraints.BELOW_BASELINE}</li>
  * <li>{@code GridBagConstraints.BELOW_BASELINE_LEADING}</li>
  * <li>{@code GridBagConstraints.BELOW_BASELINE_TRAILING}</li>
  * </ul>
- * </td>
- * </tr>
- * </tbody>
- * </table>
  * <dt>{@link GridBagConstraints#weightx},
  * {@link GridBagConstraints#weighty}
  * <dd>Used to determine how to distribute space, which is
  * important for specifying resizing behavior.
  * Unless you specify a weight for at least one component

@@ -199,18 +182,15 @@
  * is {@code CONSTANT_DESCENT}).  The row that the component is
  * aligned to is called the <em>prevailing row</em>.
  * <p>
  * The following figure shows a baseline layout and includes a
  * component that spans rows:
- * <table class="borderless" style="margin: 0px auto">
- * <caption>Baseline Layout</caption>
- * <tr style="text-align:center">
- * <td>
- * <img src="doc-files/GridBagLayout-baseline.png"
+ * <div style="float:center;text-align:center;font-weight:bold">
+ *   <p>Baseline Layout
+ *   <p><img src="doc-files/GridBagLayout-baseline.png"
  *  alt="The following text describes this graphic (Figure 1)." style="float:center">
- * </td>
- * </table>
+ * </div>
  * This layout consists of three components:
  * <ul><li>A panel that starts in row 0 and ends in row 1.  The panel
  *   has a baseline-resize behavior of {@code CONSTANT_DESCENT} and has
  *   an anchor of {@code BASELINE}.  As the baseline-resize behavior
  *   is {@code CONSTANT_DESCENT} the prevailing row for the panel is

@@ -255,24 +235,25 @@
  * The following figures show ten components (all buttons)
  * managed by a grid bag layout.  Figure 2 shows the layout for a horizontal,
  * left-to-right container and Figure 3 shows the layout for a horizontal,
  * right-to-left container.
  *
- * <table class="borderless" style="margin: 0px auto">
- * <caption style="width:600;display:none">Figures</caption>
- * <tr style="text-align:center">
- * <td>
- * <img src="doc-files/GridBagLayout-1.gif" alt="The preceding text describes this graphic (Figure 1)." style="float:center; margin: 7px 10px;">
- * </td>
- * <td>
- * <img src="doc-files/GridBagLayout-2.gif" alt="The preceding text describes this graphic (Figure 2)." style="float:center; margin: 7px 10px;">
- * </td>
- * <tr style="text-align:center">
- * <td>Figure 2: Horizontal, Left-to-Right</td>
- * <td>Figure 3: Horizontal, Right-to-Left</td>
- * </tr>
- * </table>
+ * <div style="margin:0 auto;width:680px;text-align:center;font-weight:bold">
+ *   <div style="float:left">
+ *     <p><img src="doc-files/GridBagLayout-1.gif"
+ *        alt="The preceding text describes this graphic (Figure 1)."
+ *        style="float:center; margin: 7px 10px;">
+ *     <p>Figure 2: Horizontal, Left-to-Right
+ *   </div>
+ *   <div style="float:right">
+ *     <p><img src="doc-files/GridBagLayout-2.gif"
+ *        alt="The preceding text describes this graphic (Figure 2)."
+ *        style="float:center; margin: 7px 10px;">
+ *     <p>Figure 3: Horizontal, Right-to-Left
+ *   </div>
+ *   <br style="clear:both;">
+ * </div>
  * <p>
  * Each of the ten components has the {@code fill} field
  * of its associated {@code GridBagConstraints} object
  * set to {@code GridBagConstraints.BOTH}.
  * In addition, the components have the following non-default constraints:
< prev index next >