0N/A/*
3261N/A * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/Apackage java.awt;
0N/A
0N/A/**
0N/A * The <code>GridBagConstraints</code> class specifies constraints
0N/A * for components that are laid out using the
0N/A * <code>GridBagLayout</code> class.
0N/A *
0N/A * @author Doug Stein
0N/A * @author Bill Spitzak (orignial NeWS & OLIT implementation)
0N/A * @see java.awt.GridBagLayout
0N/A * @since JDK1.0
0N/A */
0N/Apublic class GridBagConstraints implements Cloneable, java.io.Serializable {
0N/A
0N/A /**
0N/A * Specifies that this component is the next-to-last component in its
0N/A * column or row (<code>gridwidth</code>, <code>gridheight</code>),
0N/A * or that this component be placed next to the previously added
0N/A * component (<code>gridx</code>, <code>gridy</code>).
0N/A * @see java.awt.GridBagConstraints#gridwidth
0N/A * @see java.awt.GridBagConstraints#gridheight
0N/A * @see java.awt.GridBagConstraints#gridx
0N/A * @see java.awt.GridBagConstraints#gridy
0N/A */
0N/A public static final int RELATIVE = -1;
0N/A
0N/A /**
0N/A * Specifies that this component is the
0N/A * last component in its column or row.
0N/A */
0N/A public static final int REMAINDER = 0;
0N/A
0N/A /**
0N/A * Do not resize the component.
0N/A */
0N/A public static final int NONE = 0;
0N/A
0N/A /**
0N/A * Resize the component both horizontally and vertically.
0N/A */
0N/A public static final int BOTH = 1;
0N/A
0N/A /**
0N/A * Resize the component horizontally but not vertically.
0N/A */
0N/A public static final int HORIZONTAL = 2;
0N/A
0N/A /**
0N/A * Resize the component vertically but not horizontally.
0N/A */
0N/A public static final int VERTICAL = 3;
0N/A
0N/A /**
0N/A * Put the component in the center of its display area.
0N/A */
0N/A public static final int CENTER = 10;
0N/A
0N/A /**
0N/A * Put the component at the top of its display area,
0N/A * centered horizontally.
0N/A */
0N/A public static final int NORTH = 11;
0N/A
0N/A /**
0N/A * Put the component at the top-right corner of its display area.
0N/A */
0N/A public static final int NORTHEAST = 12;
0N/A
0N/A /**
0N/A * Put the component on the right side of its display area,
0N/A * centered vertically.
0N/A */
0N/A public static final int EAST = 13;
0N/A
0N/A /**
0N/A * Put the component at the bottom-right corner of its display area.
0N/A */
0N/A public static final int SOUTHEAST = 14;
0N/A
0N/A /**
0N/A * Put the component at the bottom of its display area, centered
0N/A * horizontally.
0N/A */
0N/A public static final int SOUTH = 15;
0N/A
0N/A /**
0N/A * Put the component at the bottom-left corner of its display area.
0N/A */
0N/A public static final int SOUTHWEST = 16;
0N/A
0N/A /**
0N/A * Put the component on the left side of its display area,
0N/A * centered vertically.
0N/A */
0N/A public static final int WEST = 17;
0N/A
0N/A /**
0N/A * Put the component at the top-left corner of its display area.
0N/A */
0N/A public static final int NORTHWEST = 18;
0N/A
0N/A /**
0N/A * Place the component centered along the edge of its display area
0N/A * associated with the start of a page for the current
2959N/A * {@code ComponentOrientation}. Equal to NORTH for horizontal
0N/A * orientations.
0N/A */
0N/A public static final int PAGE_START = 19;
0N/A
0N/A /**
0N/A * Place the component centered along the edge of its display area
0N/A * associated with the end of a page for the current
2959N/A * {@code ComponentOrientation}. Equal to SOUTH for horizontal
0N/A * orientations.
0N/A */
0N/A public static final int PAGE_END = 20;
0N/A
0N/A /**
0N/A * Place the component centered along the edge of its display area where
0N/A * lines of text would normally begin for the current
2959N/A * {@code ComponentOrientation}. Equal to WEST for horizontal,
0N/A * left-to-right orientations and EAST for horizontal, right-to-left
0N/A * orientations.
0N/A */
0N/A public static final int LINE_START = 21;
0N/A
0N/A /**
0N/A * Place the component centered along the edge of its display area where
0N/A * lines of text would normally end for the current
2959N/A * {@code ComponentOrientation}. Equal to EAST for horizontal,
0N/A * left-to-right orientations and WEST for horizontal, right-to-left
0N/A * orientations.
0N/A */
0N/A public static final int LINE_END = 22;
0N/A
0N/A /**
0N/A * Place the component in the corner of its display area where
0N/A * the first line of text on a page would normally begin for the current
2959N/A * {@code ComponentOrientation}. Equal to NORTHWEST for horizontal,
0N/A * left-to-right orientations and NORTHEAST for horizontal, right-to-left
0N/A * orientations.
0N/A */
0N/A public static final int FIRST_LINE_START = 23;
0N/A
0N/A /**
0N/A * Place the component in the corner of its display area where
0N/A * the first line of text on a page would normally end for the current
2959N/A * {@code ComponentOrientation}. Equal to NORTHEAST for horizontal,
0N/A * left-to-right orientations and NORTHWEST for horizontal, right-to-left
0N/A * orientations.
0N/A */
0N/A public static final int FIRST_LINE_END = 24;
0N/A
0N/A /**
0N/A * Place the component in the corner of its display area where
0N/A * the last line of text on a page would normally start for the current
2959N/A * {@code ComponentOrientation}. Equal to SOUTHWEST for horizontal,
0N/A * left-to-right orientations and SOUTHEAST for horizontal, right-to-left
0N/A * orientations.
0N/A */
0N/A public static final int LAST_LINE_START = 25;
0N/A
0N/A /**
0N/A * Place the component in the corner of its display area where
0N/A * the last line of text on a page would normally end for the current
2959N/A * {@code ComponentOrientation}. Equal to SOUTHEAST for horizontal,
0N/A * left-to-right orientations and SOUTHWEST for horizontal, right-to-left
0N/A * orientations.
0N/A */
0N/A public static final int LAST_LINE_END = 26;
0N/A
0N/A /**
0N/A * Possible value for the <code>anchor</code> field. Specifies
0N/A * that the component should be horizontally centered and
0N/A * vertically aligned along the baseline of the prevailing row.
0N/A * If the component does not have a baseline it will be vertically
0N/A * centered.
0N/A *
0N/A * @since 1.6
0N/A */
0N/A public static final int BASELINE = 0x100;
0N/A
0N/A /**
0N/A * Possible value for the <code>anchor</code> field. Specifies
0N/A * that the component should be horizontally placed along the
0N/A * leading edge. For components with a left-to-right orientation,
0N/A * the leading edge is the left edge. Vertically the component is
0N/A * aligned along the baseline of the prevailing row. If the
0N/A * component does not have a baseline it will be vertically
0N/A * centered.
0N/A *
0N/A * @since 1.6
0N/A */
0N/A public static final int BASELINE_LEADING = 0x200;
0N/A
0N/A /**
0N/A * Possible value for the <code>anchor</code> field. Specifies
0N/A * that the component should be horizontally placed along the
0N/A * trailing edge. For components with a left-to-right
0N/A * orientation, the trailing edge is the right edge. Vertically
0N/A * the component is aligned along the baseline of the prevailing
0N/A * row. If the component does not have a baseline it will be
0N/A * vertically centered.
0N/A *
0N/A * @since 1.6
0N/A */
0N/A public static final int BASELINE_TRAILING = 0x300;
0N/A
0N/A /**
0N/A * Possible value for the <code>anchor</code> field. Specifies
0N/A * that the component should be horizontally centered. Vertically
0N/A * the component is positioned so that its bottom edge touches
0N/A * the baseline of the starting row. If the starting row does not
0N/A * have a baseline it will be vertically centered.
0N/A *
0N/A * @since 1.6
0N/A */
0N/A public static final int ABOVE_BASELINE = 0x400;
0N/A
0N/A /**
0N/A * Possible value for the <code>anchor</code> field. Specifies
0N/A * that the component should be horizontally placed along the
0N/A * leading edge. For components with a left-to-right orientation,
0N/A * the leading edge is the left edge. Vertically the component is
0N/A * positioned so that its bottom edge touches the baseline of the
0N/A * starting row. If the starting row does not have a baseline it
0N/A * will be vertically centered.
0N/A *
0N/A * @since 1.6
0N/A */
0N/A public static final int ABOVE_BASELINE_LEADING = 0x500;
0N/A
0N/A /**
0N/A * Possible value for the <code>anchor</code> field. Specifies
0N/A * that the component should be horizontally placed along the
0N/A * trailing edge. For components with a left-to-right
0N/A * orientation, the trailing edge is the right edge. Vertically
0N/A * the component is positioned so that its bottom edge touches
0N/A * the baseline of the starting row. If the starting row does not
0N/A * have a baseline it will be vertically centered.
0N/A *
0N/A * @since 1.6
0N/A */
0N/A public static final int ABOVE_BASELINE_TRAILING = 0x600;
0N/A
0N/A /**
0N/A * Possible value for the <code>anchor</code> field. Specifies
0N/A * that the component should be horizontally centered. Vertically
0N/A * the component is positioned so that its top edge touches the
0N/A * baseline of the starting row. If the starting row does not
0N/A * have a baseline it will be vertically centered.
0N/A *
0N/A * @since 1.6
0N/A */
0N/A public static final int BELOW_BASELINE = 0x700;
0N/A
0N/A /**
0N/A * Possible value for the <code>anchor</code> field. Specifies
0N/A * that the component should be horizontally placed along the
0N/A * leading edge. For components with a left-to-right orientation,
0N/A * the leading edge is the left edge. Vertically the component is
0N/A * positioned so that its top edge touches the baseline of the
0N/A * starting row. If the starting row does not have a baseline it
0N/A * will be vertically centered.
0N/A *
0N/A * @since 1.6
0N/A */
0N/A public static final int BELOW_BASELINE_LEADING = 0x800;
0N/A
0N/A /**
0N/A * Possible value for the <code>anchor</code> field. Specifies
0N/A * that the component should be horizontally placed along the
0N/A * trailing edge. For components with a left-to-right
0N/A * orientation, the trailing edge is the right edge. Vertically
0N/A * the component is positioned so that its top edge touches the
0N/A * baseline of the starting row. If the starting row does not
0N/A * have a baseline it will be vertically centered.
0N/A *
0N/A * @since 1.6
0N/A */
0N/A public static final int BELOW_BASELINE_TRAILING = 0x900;
0N/A
0N/A /**
0N/A * Specifies the cell containing the leading edge of the component's
0N/A * display area, where the first cell in a row has <code>gridx=0</code>.
0N/A * The leading edge of a component's display area is its left edge for
0N/A * a horizontal, left-to-right container and its right edge for a
0N/A * horizontal, right-to-left container.
0N/A * The value
0N/A * <code>RELATIVE</code> specifies that the component be placed
0N/A * immediately following the component that was added to the container
0N/A * just before this component was added.
0N/A * <p>
0N/A * The default value is <code>RELATIVE</code>.
0N/A * <code>gridx</code> should be a non-negative value.
0N/A * @serial
0N/A * @see #clone()
0N/A * @see java.awt.GridBagConstraints#gridy
0N/A * @see java.awt.ComponentOrientation
0N/A */
0N/A public int gridx;
0N/A
0N/A /**
0N/A * Specifies the cell at the top of the component's display area,
0N/A * where the topmost cell has <code>gridy=0</code>. The value
0N/A * <code>RELATIVE</code> specifies that the component be placed just
0N/A * below the component that was added to the container just before
0N/A * this component was added.
0N/A * <p>
0N/A * The default value is <code>RELATIVE</code>.
0N/A * <code>gridy</code> should be a non-negative value.
0N/A * @serial
0N/A * @see #clone()
0N/A * @see java.awt.GridBagConstraints#gridx
0N/A */
0N/A public int gridy;
0N/A
0N/A /**
0N/A * Specifies the number of cells in a row for the component's
0N/A * display area.
0N/A * <p>
0N/A * Use <code>REMAINDER</code> to specify that the component's
0N/A * display area will be from <code>gridx</code> to the last
0N/A * cell in the row.
0N/A * Use <code>RELATIVE</code> to specify that the component's
0N/A * display area will be from <code>gridx</code> to the next
0N/A * to the last one in its row.
0N/A * <p>
0N/A * <code>gridwidth</code> should be non-negative and the default
0N/A * value is 1.
0N/A * @serial
0N/A * @see #clone()
0N/A * @see java.awt.GridBagConstraints#gridheight
0N/A */
0N/A public int gridwidth;
0N/A
0N/A /**
0N/A * Specifies the number of cells in a column for the component's
0N/A * display area.
0N/A * <p>
0N/A * Use <code>REMAINDER</code> to specify that the component's
0N/A * display area will be from <code>gridy</code> to the last
0N/A * cell in the column.
0N/A * Use <code>RELATIVE</code> to specify that the component's
0N/A * display area will be from <code>gridy</code> to the next
0N/A * to the last one in its column.
0N/A * <p>
0N/A * <code>gridheight</code> should be a non-negative value and the
0N/A * default value is 1.
0N/A * @serial
0N/A * @see #clone()
0N/A * @see java.awt.GridBagConstraints#gridwidth
0N/A */
0N/A public int gridheight;
0N/A
0N/A /**
0N/A * Specifies how to distribute extra horizontal space.
0N/A * <p>
0N/A * The grid bag layout manager calculates the weight of a column to
0N/A * be the maximum <code>weightx</code> of all the components in a
0N/A * column. If the resulting layout is smaller horizontally than the area
0N/A * it needs to fill, the extra space is distributed to each column in
0N/A * proportion to its weight. A column that has a weight of zero receives
0N/A * no extra space.
0N/A * <p>
0N/A * If all the weights are zero, all the extra space appears between
0N/A * the grids of the cell and the left and right edges.
0N/A * <p>
0N/A * The default value of this field is <code>0</code>.
0N/A * <code>weightx</code> should be a non-negative value.
0N/A * @serial
0N/A * @see #clone()
0N/A * @see java.awt.GridBagConstraints#weighty
0N/A */
0N/A public double weightx;
0N/A
0N/A /**
0N/A * Specifies how to distribute extra vertical space.
0N/A * <p>
0N/A * The grid bag layout manager calculates the weight of a row to be
0N/A * the maximum <code>weighty</code> of all the components in a row.
0N/A * If the resulting layout is smaller vertically than the area it
0N/A * needs to fill, the extra space is distributed to each row in
0N/A * proportion to its weight. A row that has a weight of zero receives no
0N/A * extra space.
0N/A * <p>
0N/A * If all the weights are zero, all the extra space appears between
0N/A * the grids of the cell and the top and bottom edges.
0N/A * <p>
0N/A * The default value of this field is <code>0</code>.
0N/A * <code>weighty</code> should be a non-negative value.
0N/A * @serial
0N/A * @see #clone()
0N/A * @see java.awt.GridBagConstraints#weightx
0N/A */
0N/A public double weighty;
0N/A
0N/A /**
0N/A * This field is used when the component is smaller than its
0N/A * display area. It determines where, within the display area, to
0N/A * place the component.
0N/A * <p> There are three kinds of possible values: orientation
0N/A * relative, baseline relative and absolute. Orientation relative
0N/A * values are interpreted relative to the container's component
0N/A * orientation property, baseline relative values are interpreted
0N/A * relative to the baseline and absolute values are not. The
0N/A * absolute values are:
0N/A * <code>CENTER</code>, <code>NORTH</code>, <code>NORTHEAST</code>,
0N/A * <code>EAST</code>, <code>SOUTHEAST</code>, <code>SOUTH</code>,
0N/A * <code>SOUTHWEST</code>, <code>WEST</code>, and <code>NORTHWEST</code>.
0N/A * The orientation relative values are: <code>PAGE_START</code>,
0N/A * <code>PAGE_END</code>,
0N/A * <code>LINE_START</code>, <code>LINE_END</code>,
0N/A * <code>FIRST_LINE_START</code>, <code>FIRST_LINE_END</code>,
0N/A * <code>LAST_LINE_START</code> and <code>LAST_LINE_END</code>. The
2959N/A * baseline relative values are:
0N/A * <code>BASELINE</code>, <code>BASELINE_LEADING</code>,
0N/A * <code>BASELINE_TRAILING</code>,
0N/A * <code>ABOVE_BASELINE</code>, <code>ABOVE_BASELINE_LEADING</code>,
0N/A * <code>ABOVE_BASELINE_TRAILING</code>,
0N/A * <code>BELOW_BASELINE</code>, <code>BELOW_BASELINE_LEADING</code>,
0N/A * and <code>BELOW_BASELINE_TRAILING</code>.
0N/A * The default value is <code>CENTER</code>.
0N/A * @serial
0N/A * @see #clone()
0N/A * @see java.awt.ComponentOrientation
0N/A */
0N/A public int anchor;
0N/A
0N/A /**
0N/A * This field is used when the component's display area is larger
0N/A * than the component's requested size. It determines whether to
0N/A * resize the component, and if so, how.
0N/A * <p>
0N/A * The following values are valid for <code>fill</code>:
0N/A * <p>
0N/A * <ul>
0N/A * <li>
0N/A * <code>NONE</code>: Do not resize the component.
0N/A * <li>
0N/A * <code>HORIZONTAL</code>: Make the component wide enough to fill
0N/A * its display area horizontally, but do not change its height.
0N/A * <li>
0N/A * <code>VERTICAL</code>: Make the component tall enough to fill its
0N/A * display area vertically, but do not change its width.
0N/A * <li>
0N/A * <code>BOTH</code>: Make the component fill its display area
0N/A * entirely.
0N/A * </ul>
0N/A * <p>
0N/A * The default value is <code>NONE</code>.
0N/A * @serial
0N/A * @see #clone()
0N/A */
0N/A public int fill;
0N/A
0N/A /**
0N/A * This field specifies the external padding of the component, the
0N/A * minimum amount of space between the component and the edges of its
0N/A * display area.
0N/A * <p>
0N/A * The default value is <code>new Insets(0, 0, 0, 0)</code>.
0N/A * @serial
0N/A * @see #clone()
0N/A */
0N/A public Insets insets;
0N/A
0N/A /**
0N/A * This field specifies the internal padding of the component, how much
0N/A * space to add to the minimum width of the component. The width of
0N/A * the component is at least its minimum width plus
0N/A * <code>ipadx</code> pixels.
0N/A * <p>
0N/A * The default value is <code>0</code>.
0N/A * @serial
0N/A * @see #clone()
0N/A * @see java.awt.GridBagConstraints#ipady
0N/A */
0N/A public int ipadx;
0N/A
0N/A /**
0N/A * This field specifies the internal padding, that is, how much
0N/A * space to add to the minimum height of the component. The height of
0N/A * the component is at least its minimum height plus
0N/A * <code>ipady</code> pixels.
0N/A * <p>
0N/A * The default value is 0.
0N/A * @serial
0N/A * @see #clone()
0N/A * @see java.awt.GridBagConstraints#ipadx
0N/A */
0N/A public int ipady;
0N/A
0N/A /**
0N/A * Temporary place holder for the x coordinate.
0N/A * @serial
0N/A */
0N/A int tempX;
0N/A /**
0N/A * Temporary place holder for the y coordinate.
0N/A * @serial
0N/A */
0N/A int tempY;
0N/A /**
0N/A * Temporary place holder for the Width of the component.
0N/A * @serial
0N/A */
0N/A int tempWidth;
0N/A /**
0N/A * Temporary place holder for the Height of the component.
0N/A * @serial
0N/A */
0N/A int tempHeight;
0N/A /**
0N/A * The minimum width of the component. It is used to calculate
0N/A * <code>ipady</code>, where the default will be 0.
0N/A * @serial
0N/A * @see #ipady
0N/A */
0N/A int minWidth;
0N/A /**
0N/A * The minimum height of the component. It is used to calculate
0N/A * <code>ipadx</code>, where the default will be 0.
0N/A * @serial
0N/A * @see #ipadx
0N/A */
0N/A int minHeight;
0N/A
0N/A // The following fields are only used if the anchor is
0N/A // one of BASELINE, BASELINE_LEADING or BASELINE_TRAILING.
0N/A // ascent and descent include the insets and ipady values.
0N/A transient int ascent;
0N/A transient int descent;
0N/A transient Component.BaselineResizeBehavior baselineResizeBehavior;
0N/A // The folllowing two fields are used if the baseline type is
0N/A // CENTER_OFFSET.
0N/A // centerPadding is either 0 or 1 and indicates if
0N/A // the height needs to be padded by one when calculating where the
0N/A // baseline lands
0N/A transient int centerPadding;
0N/A // Where the baseline lands relative to the center of the component.
0N/A transient int centerOffset;
0N/A
0N/A /*
0N/A * JDK 1.1 serialVersionUID
0N/A */
0N/A private static final long serialVersionUID = -1000070633030801713L;
0N/A
0N/A /**
0N/A * Creates a <code>GridBagConstraint</code> object with
0N/A * all of its fields set to their default value.
0N/A */
0N/A public GridBagConstraints () {
0N/A gridx = RELATIVE;
0N/A gridy = RELATIVE;
0N/A gridwidth = 1;
0N/A gridheight = 1;
0N/A
0N/A weightx = 0;
0N/A weighty = 0;
0N/A anchor = CENTER;
0N/A fill = NONE;
0N/A
0N/A insets = new Insets(0, 0, 0, 0);
0N/A ipadx = 0;
0N/A ipady = 0;
0N/A }
0N/A
0N/A /**
0N/A * Creates a <code>GridBagConstraints</code> object with
0N/A * all of its fields set to the passed-in arguments.
0N/A *
0N/A * Note: Because the use of this constructor hinders readability
0N/A * of source code, this constructor should only be used by
0N/A * automatic source code generation tools.
0N/A *
0N/A * @param gridx The initial gridx value.
0N/A * @param gridy The initial gridy value.
0N/A * @param gridwidth The initial gridwidth value.
0N/A * @param gridheight The initial gridheight value.
0N/A * @param weightx The initial weightx value.
0N/A * @param weighty The initial weighty value.
0N/A * @param anchor The initial anchor value.
0N/A * @param fill The initial fill value.
0N/A * @param insets The initial insets value.
0N/A * @param ipadx The initial ipadx value.
0N/A * @param ipady The initial ipady value.
0N/A *
0N/A * @see java.awt.GridBagConstraints#gridx
0N/A * @see java.awt.GridBagConstraints#gridy
0N/A * @see java.awt.GridBagConstraints#gridwidth
0N/A * @see java.awt.GridBagConstraints#gridheight
0N/A * @see java.awt.GridBagConstraints#weightx
0N/A * @see java.awt.GridBagConstraints#weighty
0N/A * @see java.awt.GridBagConstraints#anchor
0N/A * @see java.awt.GridBagConstraints#fill
0N/A * @see java.awt.GridBagConstraints#insets
0N/A * @see java.awt.GridBagConstraints#ipadx
0N/A * @see java.awt.GridBagConstraints#ipady
0N/A *
0N/A * @since 1.2
0N/A */
0N/A public GridBagConstraints(int gridx, int gridy,
0N/A int gridwidth, int gridheight,
0N/A double weightx, double weighty,
0N/A int anchor, int fill,
0N/A Insets insets, int ipadx, int ipady) {
0N/A this.gridx = gridx;
0N/A this.gridy = gridy;
0N/A this.gridwidth = gridwidth;
0N/A this.gridheight = gridheight;
0N/A this.fill = fill;
0N/A this.ipadx = ipadx;
0N/A this.ipady = ipady;
0N/A this.insets = insets;
0N/A this.anchor = anchor;
0N/A this.weightx = weightx;
0N/A this.weighty = weighty;
0N/A }
0N/A
0N/A /**
0N/A * Creates a copy of this grid bag constraint.
0N/A * @return a copy of this grid bag constraint
0N/A */
0N/A public Object clone () {
0N/A try {
0N/A GridBagConstraints c = (GridBagConstraints)super.clone();
0N/A c.insets = (Insets)insets.clone();
0N/A return c;
0N/A } catch (CloneNotSupportedException e) {
0N/A // this shouldn't happen, since we are Cloneable
0N/A throw new InternalError();
0N/A }
0N/A }
0N/A
0N/A boolean isVerticallyResizable() {
0N/A return (fill == BOTH || fill == VERTICAL);
0N/A }
0N/A}