Distributed Genetic Programming Framework
print print

File org.dgpf.gui.utils.Layout.java

Here you can find all the information about the file org.dgpf.gui.utils.Layout.java. You may explore it here or download it onto your local disk.
 * Copyright (c) 2006 Alexander Podlich
 * E-Mail           : podlich@student.uni-kassel.de
 * Creation Date    : 06.07.2006 21:28:12
 * Original Filename: org.dgpf.gui.DGPFLayout.java
 * Version          : 1.0
 * Last modification: 06.07.2006
 * Last modified by : Alexander Podlich
 *                    Version 2.1, February 1999
 *                    You should have received a copy of this license along
 *                    with this library; if not, write to the Free Software
 *                    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *                    MA 02111-1307, USA or download the license under
 *                    http://www.gnu.org/copyleft/lesser.html.
 * Warranty         : This software is provided "as is" without any
 *                    warranty; without even the implied warranty of
 *                    merchantability or fitness for a particular purpose.
 *                    See the Gnu Lesser General Public License for more
 *                    details.

package org.dgpf.gui.utils;

import java.awt.Component;
import java.awt.Container;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

 * This class define the layout grid bag layout manager abd set the grid
 * bag layout constraints.
 * @author Alexander Podlich

public final class Layout

   * Set the gridbag-constraints of a component and add it to the specified
   * container.
   * @param p_container
   *          The container to add the component to.
   * @param p_component
   *          The component to be formatted.
   * @param p_weightx
   *          Specifies how to distribute extra horizontal space.
   * @param p_weighty
   *          Specifies how to distribute extra vertical space.
   * @param p_fill
   *          This field is used when the component's display area is
   *          larger than the component's requested size.
   * @param p_anchor
   *          This field is used when the component is smaller than its
   *          display area.
   * @param p_gridwidth
   *          Specifies the number of cells in a row for the component's
   *          display area.
   * @param p_insets
   *          This field specifies the external padding of the component,
   *          the minimum amount of space between the component and the
   *          edges of its display area.

  public static final void set_constraints(final Container p_container,
      final Component p_component, final double p_weightx,
      final double p_weighty, final int p_fill, final int p_anchor,
      final int p_gridwidth, final Insets p_insets)

    GridBagLayout l_gridBagLayout = ((GridBagLayout) (p_container
    GridBagConstraints l_gridBagConstraints = new GridBagConstraints();

    l_gridBagConstraints.weightx = p_weightx;
    l_gridBagConstraints.weighty = p_weighty;
    l_gridBagConstraints.fill = p_fill;
    l_gridBagConstraints.anchor = p_anchor;
    l_gridBagConstraints.gridwidth = p_gridwidth;
    l_gridBagConstraints.insets = p_insets;

    l_gridBagLayout.setConstraints(p_component, l_gridBagConstraints);


File Information:

file name:Layout.java
qualified name:org.dgpf.gui.utils.Layout.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/dgpf/gui/utils/Layout.java
size:3.214 KB (3292 B)
uploaded: 2018-01-07 12:03:35 GMT+0000
last update: 2006-09-24 23:47:04 GMT+0000
last access: 2018-04-26 11:27:51 GMT+0000

statistics online since 2006-01-02.   RSS Feed
Contact us by sending an email to tweise@gmx.de to receive further information, to report errors, or to join our project.
All content on this site (http://dgpf.sourceforge.net/) is LGPL-licensed.
http://dgpf.sourceforge.net/scripts/source/source.php last modified at 2018-01-07 12:03:34 GMT+0000 served at 2018-04-26 11:27:51 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo