at.tuwien.ifs.somtoolbox.util
Class GridBagConstraintsIFS

java.lang.Object
  extended by java.awt.GridBagConstraints
      extended by at.tuwien.ifs.somtoolbox.util.GridBagConstraintsIFS
All Implemented Interfaces:
Serializable, Cloneable

public class GridBagConstraintsIFS
extends GridBagConstraints

A helper class around GridBagConstraints, providing convenience methods to set locations, etc..

Version:
$Id: GridBagConstraintsIFS.java 3358 2010-02-11 14:35:07Z mayer $
Author:
Rudolf Mayer
See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           
 
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
GridBagConstraintsIFS()
          New constraints top-left, top-alignment left.
GridBagConstraintsIFS(int anchor, int fill)
           
 
Method Summary
 GridBagConstraintsIFS clone()
           
 GridBagConstraintsIFS fillHeight()
          Create a new instance with vertical weight 1
 GridBagConstraintsIFS fillWidth()
          Create a new instance with horizontal weight 1
 GridBagConstraintsIFS moveTo(int x, int y)
          moves to the given position
 GridBagConstraintsIFS nextCol()
          move into the next column
 GridBagConstraintsIFS nextRow()
          move into the next row
 void reset()
          reset to top-left position, top-alignment left
 GridBagConstraintsIFS resetWeights()
          resets the weights to 0
 GridBagConstraintsIFS setAnchor(int anchor)
           
 GridBagConstraintsIFS setFill(int fill)
           
 GridBagConstraintsIFS setGridHeight(int gridheight)
          set the grid height
 GridBagConstraintsIFS setGridWidth(int gridwidth)
          set the grid width
 GridBagConstraintsIFS setInsets(Insets insets)
           
 GridBagConstraintsIFS setInsets(int padding)
           
 GridBagConstraintsIFS setInsets(int x, int y)
           
 GridBagConstraintsIFS setPadding(int padx, int pady)
           
 GridBagConstraintsIFS setPadding(int padx, int pady, Insets insets)
           
 GridBagConstraintsIFS setWeights(int weightx, int weighty)
          set the x and y weights
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

GridBagConstraintsIFS

public GridBagConstraintsIFS()
New constraints top-left, top-alignment left.


GridBagConstraintsIFS

public GridBagConstraintsIFS(int anchor,
                             int fill)
Method Detail

reset

public void reset()
reset to top-left position, top-alignment left


setFill

public GridBagConstraintsIFS setFill(int fill)

setAnchor

public GridBagConstraintsIFS setAnchor(int anchor)

setPadding

public GridBagConstraintsIFS setPadding(int padx,
                                        int pady)

setPadding

public GridBagConstraintsIFS setPadding(int padx,
                                        int pady,
                                        Insets insets)

setInsets

public GridBagConstraintsIFS setInsets(int padding)

setInsets

public GridBagConstraintsIFS setInsets(int x,
                                       int y)

setInsets

public GridBagConstraintsIFS setInsets(Insets insets)

nextCol

public GridBagConstraintsIFS nextCol()
move into the next column


nextRow

public GridBagConstraintsIFS nextRow()
move into the next row


moveTo

public GridBagConstraintsIFS moveTo(int x,
                                    int y)
moves to the given position


setGridWidth

public GridBagConstraintsIFS setGridWidth(int gridwidth)
set the grid width


setGridHeight

public GridBagConstraintsIFS setGridHeight(int gridheight)
set the grid height


setWeights

public GridBagConstraintsIFS setWeights(int weightx,
                                        int weighty)
set the x and y weights


resetWeights

public GridBagConstraintsIFS resetWeights()
resets the weights to 0


fillWidth

public GridBagConstraintsIFS fillWidth()
Create a new instance with horizontal weight 1


fillHeight

public GridBagConstraintsIFS fillHeight()
Create a new instance with vertical weight 1


clone

public GridBagConstraintsIFS clone()
Overrides:
clone in class GridBagConstraints