src/share/classes/javax/swing/BoxLayout.java

Print this page




  99  * the vertical centers of other components with 0.5 Y alignment.
 100  * <p>
 101  * Similarly, for a vertical layout,
 102  * BoxLayout attempts to make all components in the column
 103  * as wide as the widest component.
 104  * If that fails, it aligns them horizontally
 105  * according to their X alignments.  For <code>PAGE_AXIS</code> layout,
 106  * horizontal alignment is done based on the leading edge of the component.
 107  * In other words, an X alignment value of 0.0 means the left edge of a
 108  * component if the container's <code>ComponentOrientation</code> is left to
 109  * right and it means the right edge of the component otherwise.
 110  * <p>
 111  * Instead of using BoxLayout directly, many programs use the Box class.
 112  * The Box class is a lightweight container that uses a BoxLayout.
 113  * It also provides handy methods to help you use BoxLayout well.
 114  * Adding components to multiple nested boxes is a powerful way to get
 115  * the arrangement you want.
 116  * <p>
 117  * For further information and examples see
 118  * <a
 119  href="http://java.sun.com/docs/books/tutorial/uiswing/layout/box.html">How to Use BoxLayout</a>,
 120  * a section in <em>The Java Tutorial.</em>
 121  * <p>
 122  * <strong>Warning:</strong>
 123  * Serialized objects of this class will not be compatible with
 124  * future Swing releases. The current serialization support is
 125  * appropriate for short term storage or RMI between applications running
 126  * the same version of Swing.  As of 1.4, support for long term storage
 127  * of all JavaBeans<sup><font size="-2">TM</font></sup>
 128  * has been added to the <code>java.beans</code> package.
 129  * Please see {@link java.beans.XMLEncoder}.
 130  *
 131  * @see Box
 132  * @see java.awt.ComponentOrientation
 133  * @see JComponent#getAlignmentX
 134  * @see JComponent#getAlignmentY
 135  *
 136  * @author   Timothy Prinzing
 137  */
 138 @SuppressWarnings("serial")
 139 public class BoxLayout implements LayoutManager2, Serializable {




  99  * the vertical centers of other components with 0.5 Y alignment.
 100  * <p>
 101  * Similarly, for a vertical layout,
 102  * BoxLayout attempts to make all components in the column
 103  * as wide as the widest component.
 104  * If that fails, it aligns them horizontally
 105  * according to their X alignments.  For <code>PAGE_AXIS</code> layout,
 106  * horizontal alignment is done based on the leading edge of the component.
 107  * In other words, an X alignment value of 0.0 means the left edge of a
 108  * component if the container's <code>ComponentOrientation</code> is left to
 109  * right and it means the right edge of the component otherwise.
 110  * <p>
 111  * Instead of using BoxLayout directly, many programs use the Box class.
 112  * The Box class is a lightweight container that uses a BoxLayout.
 113  * It also provides handy methods to help you use BoxLayout well.
 114  * Adding components to multiple nested boxes is a powerful way to get
 115  * the arrangement you want.
 116  * <p>
 117  * For further information and examples see
 118  * <a
 119  href="http://docs.oracle.com/javase/tutorial/uiswing/layout/box.html">How to Use BoxLayout</a>,
 120  * a section in <em>The Java Tutorial.</em>
 121  * <p>
 122  * <strong>Warning:</strong>
 123  * Serialized objects of this class will not be compatible with
 124  * future Swing releases. The current serialization support is
 125  * appropriate for short term storage or RMI between applications running
 126  * the same version of Swing.  As of 1.4, support for long term storage
 127  * of all JavaBeans<sup><font size="-2">TM</font></sup>
 128  * has been added to the <code>java.beans</code> package.
 129  * Please see {@link java.beans.XMLEncoder}.
 130  *
 131  * @see Box
 132  * @see java.awt.ComponentOrientation
 133  * @see JComponent#getAlignmentX
 134  * @see JComponent#getAlignmentY
 135  *
 136  * @author   Timothy Prinzing
 137  */
 138 @SuppressWarnings("serial")
 139 public class BoxLayout implements LayoutManager2, Serializable {