|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectGbcMaker
public class GbcMaker
A "factory" to create GridBagConstraints. To have the same border between GUI elements an at the outside of a GridBagLayout the insets on inner borders must be half of the insets on outer borders.
Constructor Summary | |
---|---|
GbcMaker(int rows,
int columns,
int b)
Construct a new GbcMaker |
Method Summary | |
---|---|
java.awt.GridBagConstraints |
create(int y,
int x,
int h,
int w)
Create a new GridBagConstraints. |
java.awt.GridBagConstraints |
createDummyGbc(int y,
int x,
int h,
int w)
Create GridBagConstraints for a dummy panel (see above). |
javax.swing.JPanel |
createDummyPanel()
Create a dummy JPanel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GbcMaker(int rows, int columns, int b)
rows
- The number of rows in the GridBagLayout.columns
- The number of columns in the GridBagLayout.b
- The GUI element border in pixels.Method Detail |
---|
public java.awt.GridBagConstraints create(int y, int x, int h, int w)
y
- The row in which the GUI element starts.x
- The column in which the GUI element starts.h
- The height of the GUI element in rows.w
- The width of the GUI element in columns.
public javax.swing.JPanel createDummyPanel()
public java.awt.GridBagConstraints createDummyGbc(int y, int x, int h, int w)
y
- The start row of the panel.x
- The start column of the panel.h
- The panel height in rows.w
- The panel width in columns.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |