|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.lanl.Pids.GridbagLayoutHelper
The class GridbagLayoutHelper contains methods for performing Gridbag layout operations.
| Method Summary | |
static int |
add1component(java.awt.Container cont,
java.awt.Component c1,
int yrow)
adds one component stretches over 2 xgrids and returns the next row number |
static int |
add2components(java.awt.Container cont,
java.awt.Component c1,
javax.swing.JComponent c2,
int yrow)
adds two components side-by-side in the row and returns the next row number |
static int |
addcomponentinrow(java.awt.Container cont,
java.awt.Component c1,
int xcol,
int yrow)
adds a component in the row and returns the next col number |
static void |
constrain(java.awt.Container container,
java.awt.Component component,
int grid_x,
int grid_y,
int grid_width,
int grid_height,
int fill,
int anchor,
double weight_x,
double weight_y,
int top,
int left,
int bottom,
int right)
adds component with constraints to the container |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final void constrain(java.awt.Container container,
java.awt.Component component,
int grid_x,
int grid_y,
int grid_width,
int grid_height,
int fill,
int anchor,
double weight_x,
double weight_y,
int top,
int left,
int bottom,
int right)
container - the container to which the component will be addedcomponent - the component/widget which will be added to the containergrid_x - the x grid position of the componentgrid_y - the y grid position of the componentgrid_width - the width of the component in grid cellsgrid_height - the height of the component in grid cellsfill - which dimensions of the component will growanchor - specifies how the component will be displayed if smaller than cellsweight_x - specifies how extra space in x will be distributedweight_y - specifies how extra space in y will be distributedtop - the top marginleft - the left marginbottom - the bottom marginright - the right marginGridBagConstraints
public static final int add1component(java.awt.Container cont,
java.awt.Component c1,
int yrow)
cont - the container to add the component toc1 - the component to addyrow - the ygrid row in which to add the component; xgrid is 0
public static final int add2components(java.awt.Container cont,
java.awt.Component c1,
javax.swing.JComponent c2,
int yrow)
cont - the container to add the components toc1 - left most component to add; at xgrid of 0c2 - right most component to add; at xgrid of 1yrow - the ygrid row in which to add the component
public static final int addcomponentinrow(java.awt.Container cont,
java.awt.Component c1,
int xcol,
int yrow)
cont - the container to add the components toc1 - left most component to add; at xgrid of 0xcol - the xgrid col in which to add the componentyrow - the ygrid row in which to add the component
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||