Package jaxx.runtime.swing
Class GBC
java.lang.Object
java.awt.GridBagConstraints
jaxx.runtime.swing.GBC
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class GBC
extends java.awt.GridBagConstraints
This class simplifies the use of the GridBagConstraints
class.
- 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
Constructors Constructor Description GBC(int gridx, int gridy)Constructs a GBC with a given gridx and gridy position and all other grid bag constraint values set to the default.GBC(int gridx, int gridy, int gridwidth, int gridheight)Constructs a GBC with given gridx, gridy, gridwidth, gridheight and all other grid bag constraint values set to the default. -
Method Summary
Modifier and Type Method Description GBCsetAnchor(int anchor)Sets the anchor.GBCsetFill(int fill)Sets the fill direction.GBCsetInsets(int distance)Sets the insets of this cell.GBCsetInsets(int top, int left, int bottom, int right)Sets the insets of this cell.GBCsetIpad(int ipadx, int ipady)Sets the internal paddingGBCsetWeight(double weightx, double weighty)Sets the cell weights.Methods inherited from class java.awt.GridBagConstraints
cloneMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
GBC
public GBC(int gridx, int gridy)Constructs a GBC with a given gridx and gridy position and all other grid bag constraint values set to the default.- Parameters:
gridx- the gridx positiongridy- the gridy position
-
GBC
public GBC(int gridx, int gridy, int gridwidth, int gridheight)Constructs a GBC with given gridx, gridy, gridwidth, gridheight and all other grid bag constraint values set to the default.- Parameters:
gridx- the gridx positiongridy- the gridy positiongridwidth- the cell span in x-directiongridheight- the cell span in y-direction
-
-
Method Details
-
setAnchor
Sets the anchor.- Parameters:
anchor- the anchor value- Returns:
- this object for further modification
-
setFill
Sets the fill direction.- Parameters:
fill- the fill direction- Returns:
- this object for further modification
-
setWeight
Sets the cell weights.- Parameters:
weightx- the cell weight in x-directionweighty- the cell weight in y-direction- Returns:
- this object for further modification
-
setInsets
Sets the insets of this cell.- Parameters:
distance- the spacing to use in all directions- Returns:
- this object for further modification
-
setInsets
Sets the insets of this cell.- Parameters:
top- the spacing to use on topleft- the spacing to use to the leftbottom- the spacing to use on the bottomright- the spacing to use to the right- Returns:
- this object for further modification
-
setIpad
Sets the internal padding- Parameters:
ipadx- the internal padding in x-directionipady- the internal padding in y-direction- Returns:
- this object for further modification
-