com.lightdev.app.filemanager.ui
Class GridBagHelper

java.lang.Object
  extended by com.lightdev.app.filemanager.ui.GridBagHelper

public class GridBagHelper
extends Object

GridBagHelper provides some helper methods to work with GridBagLayouts.

The class typically is instanciated locally and temporary inside a method that builds a gui. Once all gui elements are layed out, this class can be freed again.

Version:
Version 2, June 14, 2004
Author:
Ulrich Hilger, Light Development, http://www.lightdev.com, info@lightdev.com, published under the terms and conditions of the BSD License, for details see file license.txt in the distribution package of this software

Constructor Summary
GridBagHelper()
          constructor
 
Method Summary
 void addGridBagComponent(Container container, JComponent comp, GridBagLayout g, GridBagConstraints c, int gx, int gy, int a)
          convenience method for adding a component to a container layed out by a GridBagLayout
 void addGridBagComponent(Container container, JComponent comp, GridBagLayout g, GridBagConstraints c, int gx, int gy, int a, int gw, int gh, int f, double wx, double wy)
          convenience method for adding a component to a container layed out by a GridBagLayout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridBagHelper

public GridBagHelper()
constructor

Method Detail

addGridBagComponent

public void addGridBagComponent(Container container,
                                JComponent comp,
                                GridBagLayout g,
                                GridBagConstraints c,
                                int gx,
                                int gy,
                                int a)
convenience method for adding a component to a container layed out by a GridBagLayout

Parameters:
container - the container to add a component to
comp - the component to add to container
g - the GridBagLayout associated with container
c - the GridBagConstraints to use
gx - the value to use for GridBagConstraints.gridx
gy - the value to use for GridBagConstraints.gridy
a - the value to use for GridBagConstraints.anchor

addGridBagComponent

public void addGridBagComponent(Container container,
                                JComponent comp,
                                GridBagLayout g,
                                GridBagConstraints c,
                                int gx,
                                int gy,
                                int a,
                                int gw,
                                int gh,
                                int f,
                                double wx,
                                double wy)
convenience method for adding a component to a container layed out by a GridBagLayout

Parameters:
container - the container to add a component to
comp - the component to add to container
g - the GridBagLayout associated with container
c - the GridBagConstraints to use
gx - the value to use for GridBagConstraints.gridx
gy - the value to use for GridBagConstraints.gridy
a - the value to use for GridBagConstraints.anchor
gw - the value to use for GridBagConstraints.gridwidth
gh - the value to use for GridBagConstraints.gridheight
f - the value to use for GridBagConstraints.fill
wx - the value to use for GridBagConstraints.weightx
wy - the value to use for GridBagConstraints.weighty