|
JavaGantt 2011.1 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.GridBagConstraints
eu.beesoft.gaia.swing.form.CellConstraints
public class CellConstraints
Constraints extends capabilities of java.awt.GridBagConstraints
and is designe to use with Form component. It has a properties to
manage border painting around a cell. When property is set, a line is drawed.
There is a set of the init() methods implemented in this class.
They set the grid coordinates and sizes (variables in
GrdiBagConstraints without modifying other variables. You can
call them on a single CellConstraints instance, because it is
internally cloned in GridBagLayout. So you can write this code:
Form form = new Form ();
CellConstraints cc = new CellConstraints ();
form.add (new JLabel ("First"), cc.init (0, 0));
form.add (new JTextField (10), cc.init (1, 0));
form.add (new JLabel ("Second"), cc.init (0, 1));
form.add (new JTextField (), cc.init (1, 1));
| Field Summary | |
|---|---|
boolean |
bottomBorder
Set to true if Form should draw a horizontal line on the bottom
margin. |
boolean |
leftBorder
Set to true if Form should draw a vertical line on the left
margin. |
boolean |
rightBorder
Set to true if Form should draw a vertical line on the right
margin. |
boolean |
topBorder
Set to true if Form should draw a horizontal line on the top
margin. |
| Fields inherited from class java.awt.GridBagConstraints |
|---|
anchor, 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 | |
|---|---|
CellConstraints()
Creates a new instance of CellConstraints. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clones this instance. |
void |
init(int x)
Initializes this instance with given arguments. |
void |
init(int x,
int y)
Initializes this instance with given arguments. |
void |
init(int x,
int y,
int width)
Initializes this instance with given arguments. |
void |
init(int x,
int y,
int width,
int height)
Initializes this instance with given arguments. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean leftBorder
Form should draw a vertical line on the left
margin.
public boolean topBorder
Form should draw a horizontal line on the top
margin.
public boolean rightBorder
Form should draw a vertical line on the right
margin.
public boolean bottomBorder
Form should draw a horizontal line on the bottom
margin.
| Constructor Detail |
|---|
public CellConstraints()
| Method Detail |
|---|
public void init(int x)
x - - the value to set to gridx field
public void init(int x,
int y)
x - - the value to set to gridx fieldy - - the value to set to gridy field
public void init(int x,
int y,
int width)
x - - the value to set to gridx fieldy - - the value to set to gridy fieldwidth - - the value to set to gridwidth field
public void init(int x,
int y,
int width,
int height)
x - - the value to set to gridx fieldy - - the value to set to gridy fieldwidth - - the value to set to gridwidth fieldheight - - the value to set to height fieldpublic java.lang.Object clone()
clone in class java.awt.GridBagConstraints
|
JavaGantt 2011.1 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||