org.jtheque.utils.ui
Class GridBagUtils

java.lang.Object
  extended by java.awt.GridBagConstraints
      extended by org.jtheque.utils.ui.GridBagUtils
All Implemented Interfaces:
Serializable, Cloneable

public final class GridBagUtils
extends GridBagConstraints

An utility class to make easier the UI development with GridBagLayout.

Author:
Baptiste Wicht
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.awt.GridBagConstraints
ABOVE_BASELINE, ABOVE_BASELINE_LEADING, ABOVE_BASELINE_TRAILING, anchor, BASELINE, BASELINE_LEADING, BASELINE_TRAILING, BELOW_BASELINE, BELOW_BASELINE_LEADING, BELOW_BASELINE_TRAILING, BOTH, CENTER, EAST, fill, FIRST_LINE_END, FIRST_LINE_START, gridheight, gridwidth, gridx, gridy, HORIZONTAL, insets, ipadx, ipady, LAST_LINE_END, LAST_LINE_START, LINE_END, LINE_START, NONE, NORTH, NORTHEAST, NORTHWEST, PAGE_END, PAGE_START, RELATIVE, REMAINDER, SOUTH, SOUTHEAST, SOUTHWEST, VERTICAL, weightx, weighty, WEST
 
Constructor Summary
GridBagUtils()
           
 
Method Summary
 GridBagConstraints gbcSet(int x, int y)
          Configure and return the GridBagConstraints object.
 GridBagConstraints gbcSet(int x, int y, int fill)
          Configure and return the GridBagConstraints object.
 GridBagConstraints gbcSet(int x, int y, int fill, int anchor)
          Configure and return the GridBagConstraints object.
 GridBagConstraints gbcSet(int x, int y, int fill, int anchor, double weightx, double weighty)
          Configure and return the GridBagConstraints object.
 GridBagConstraints gbcSet(int x, int y, int fill, int anchor, int width, int height)
          Configure and return the GridBagConstraints object.
 GridBagConstraints gbcSet(int x, int y, int fill, int anchor, int width, int height, double weightx, double weighty)
          Configure and return the GridBagConstraints object.
 GridBagConstraints gbcSet(int x, int y, int fill, int anchor, int width, int height, double weightx, double weighty, int ipadx, int ipady)
          Configure and return the GridBagConstraints object.
 void setDefaultInsets(Insets defaultInsets)
          Set the default insets.
 void setDefaultInsets(int top, int left, int bottom, int right)
          Set the default insets.
 
Methods inherited from class java.awt.GridBagConstraints
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridBagUtils

public GridBagUtils()
Method Detail

gbcSet

public GridBagConstraints gbcSet(int x,
                                 int y)
Configure and return the GridBagConstraints object.

Parameters:
x - The x position of the component.
y - The y position of the component.
Returns:
The GridBagConstraints object.

gbcSet

public GridBagConstraints gbcSet(int x,
                                 int y,
                                 int fill)
Configure and return the GridBagConstraints object.

Parameters:
x - The x position of the component.
y - The y position of the component.
fill - The fill constraints.
Returns:
The GridBagConstraints object.

gbcSet

public GridBagConstraints gbcSet(int x,
                                 int y,
                                 int fill,
                                 int anchor)
Configure and return the GridBagConstraints object.

Parameters:
x - The x position of the component.
y - The y position of the component.
fill - The fill constraints.
anchor - The anchor of the component.
Returns:
The GridBagConstraints object.

gbcSet

public GridBagConstraints gbcSet(int x,
                                 int y,
                                 int fill,
                                 int anchor,
                                 int width,
                                 int height)
Configure and return the GridBagConstraints object.

Parameters:
x - The x position of the component.
y - The y position of the component.
fill - The fill constraints.
anchor - The anchor of the component.
width - The col span.
height - The row span.
Returns:
The GridBagConstraints object.

gbcSet

public GridBagConstraints gbcSet(int x,
                                 int y,
                                 int fill,
                                 int anchor,
                                 int width,
                                 int height,
                                 double weightx,
                                 double weighty)
Configure and return the GridBagConstraints object.

Parameters:
x - The x position of the component.
y - The y position of the component.
fill - The fill constraints.
anchor - The anchor of the component.
width - The col span.
height - The row span.
weightx - The col fill weight.
weighty - The row fill weight.
Returns:
The GridBagConstraints object.

gbcSet

public GridBagConstraints gbcSet(int x,
                                 int y,
                                 int fill,
                                 int anchor,
                                 int width,
                                 int height,
                                 double weightx,
                                 double weighty,
                                 int ipadx,
                                 int ipady)
Configure and return the GridBagConstraints object.

Parameters:
x - The x position of the component.
y - The y position of the component.
fill - The fill constraints.
anchor - The anchor of the component.
width - The col span.
height - The row span.
weightx - The col fill weight.
weighty - The row fill weight.
ipadx - The x internal padding width.
ipady - The y internal padding height.
Returns:
The GridBagConstraints object.

gbcSet

public GridBagConstraints gbcSet(int x,
                                 int y,
                                 int fill,
                                 int anchor,
                                 double weightx,
                                 double weighty)
Configure and return the GridBagConstraints object.

Parameters:
x - The x position of the component.
y - The y position of the component.
fill - The fill constraints.
anchor - The anchor of the component.
weightx - The col fill weight.
weighty - The row fill weight.
Returns:
The GridBagConstraints object.

setDefaultInsets

public void setDefaultInsets(Insets defaultInsets)
Set the default insets.

Parameters:
defaultInsets - The default insets.

setDefaultInsets

public void setDefaultInsets(int top,
                             int left,
                             int bottom,
                             int right)
Set the default insets.

Parameters:
top - The top inset.
left - The left inset.
bottom - The bottom inset.
right - The right inset.


Copyright © 2010 JTheque. All Rights Reserved.