|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.GridBagConstraints
com.moneydance.awt.GridC
public class GridC
A class that makes building GridBagConstraints objects easy, efficient and readable for layout out GUI elements using the GridBagLayout layout manager To use this, call GridC.getc() and then call any of the methods below on the result in order to set different attributes for the component that is being laid out. For example:
JPanel p = new JPanel(new GridBagLayout()); p.add(myLabel, GridC.getc(0,0).east()); p.add(myField, GridC.getc(1,0).wx(1).fillx().colspan(2)); p.add(myLabel2, GridC.getc(0,1).east()); p.add(myField2, GridC.getc(1,1).wx(1).fillx()); p.add(myButton2, GridC.getc(1,2));
Field Summary | |
---|---|
static int |
BOTTOM_FIELD_INSET
|
static int |
BOTTOM_LABEL_INSET
|
static int |
LEFT_FIELD_INSET
|
static int |
LEFT_LABEL_INSET
|
static int |
RIGHT_FIELD_INSET
|
static int |
RIGHT_LABEL_INSET
|
static int |
TOP_FIELD_INSET
|
static int |
TOP_LABEL_INSET
|
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 | |
---|---|
GridC()
|
Method Summary | |
---|---|
GridC |
center()
Anchor the component to the center (the default) |
GridC |
colspan(int numColumns)
Set the gridwidth: number of columns to span. |
GridC |
copy()
Return a clone of this object that can be stored for later use |
GridC |
east()
Anchor the component to the east |
GridC |
field()
Shortcut for the constraints associated with a field in a standard dialog |
GridC |
fillboth()
Set the fill type to both horizontal and vertical |
GridC |
fillnone()
Set the fill type to no filling (the default) |
GridC |
fillx()
Set the fill type to horizontal |
GridC |
filly()
Set the fill type to vertical |
static GridC |
getc()
Reset and return the singleton GridC instance |
static GridC |
getc(int x,
int y)
Reset and return the singleton GridC instance, with x and y initialized to the given values. |
GridC |
insets(int top,
int left,
int bottom,
int right)
Set the insets |
GridC |
label()
Shortcut for the settings associated with a label in a standard dialog |
GridC |
north()
Anchor the component to the north |
GridC |
northEast()
Anchor the component to the northeast |
GridC |
northWest()
Anchor the component to the northwest |
GridC |
padx(int xPadding)
Set the internal padding along the X axis |
GridC |
pady(int yPadding)
Set the internal padding along the Y axis |
GridC |
reset()
Reset all of the constraints to the default value and return ourself. |
GridC |
rowspan(int numRows)
Set the gridheight: number of rows to span. |
GridC |
south()
Anchor the component to the south |
GridC |
southEast()
Anchor the component to the southeast |
GridC |
southWest()
Anchor the component to the southwest |
GridC |
west()
Anchor the component to the west |
GridC |
wx(float xWeight)
Set our weightx value and return self |
GridC |
wxy(float xWeight,
float yWeight)
Set our weightx and weighty value and return self |
GridC |
wy(float yWeight)
Set our weighty value and return self |
GridC |
x(int x)
Set our gridx value and return self |
GridC |
xy(int x,
int y)
Set both the gridx and gridy values and return self |
GridC |
y(int y)
Set our gridx value and return self |
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 |
Field Detail |
---|
public static int TOP_LABEL_INSET
public static int LEFT_LABEL_INSET
public static int BOTTOM_LABEL_INSET
public static int RIGHT_LABEL_INSET
public static int TOP_FIELD_INSET
public static int LEFT_FIELD_INSET
public static int BOTTOM_FIELD_INSET
public static int RIGHT_FIELD_INSET
Constructor Detail |
---|
public GridC()
Method Detail |
---|
public static final GridC getc()
public static final GridC getc(int x, int y)
public GridC reset()
public GridC x(int x)
public GridC y(int y)
public GridC xy(int x, int y)
public GridC wx(float xWeight)
public GridC wy(float yWeight)
public GridC wxy(float xWeight, float yWeight)
public GridC colspan(int numColumns)
public GridC rowspan(int numRows)
public GridC fillx()
public GridC filly()
public GridC fillboth()
public GridC fillnone()
public GridC insets(int top, int left, int bottom, int right)
public GridC east()
public GridC west()
public GridC north()
public GridC south()
public GridC northEast()
public GridC northWest()
public GridC southEast()
public GridC southWest()
public GridC center()
public GridC padx(int xPadding)
public GridC pady(int yPadding)
public GridC label()
public GridC field()
public GridC copy()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |