|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.lxtreme.ols.util.swing.SpringLayoutUtils
public final class SpringLayoutUtils
A 1.4 file that provides utility methods for creating form- or grid-style layouts with SpringLayout. These utilities are used by several programs, such as SpringBox and SpringCompactGrid.
Field Summary | |
---|---|
static String |
SEPARATOR
|
Method Summary | |
---|---|
static Container |
addSeparator(Container aContainer,
String aText)
Adds a labeled separator to the given container. |
static void |
addToConstraint(SpringLayout.Constraints aConstraints,
String aEdgeName,
int aConstant)
Adds a constant value to a given edge of a given constraints. |
static void |
makeCompactGrid(Container aContainer,
int aRows,
int aCols,
int aInitialX,
int aInitialY,
int aXpad,
int aYpad)
Aligns the first rows * cols components of
parent in a grid. |
static void |
makeEditorGrid(Container aContainer,
int aInitialX,
int aInitialY)
Makes a compact grid for use in "editors", in which a grid of two columns is created. |
static void |
makeGrid(Container aContainer,
int aRows,
int aCols,
int aInitialX,
int aInitialY,
int aXpad,
int aYpad)
Aligns the first rows * cols components of
parent in a grid. |
static JComponent |
setSeparatorProperty(JComponent aComponent)
Marks the given component as "separator" component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SEPARATOR
Method Detail |
---|
public static final Container addSeparator(Container aContainer, String aText)
aContainer
- the container to add the separator + label to, cannot be
null
.aText
- the (optional) text of the label to add, may be null
.
null
.public static void addToConstraint(SpringLayout.Constraints aConstraints, String aEdgeName, int aConstant)
aConstraints
- the constraints to mutate;aEdgeName
- the name of the edge to mutate;aConstant
- the new value to set.public static void makeCompactGrid(Container aContainer, int aRows, int aCols, int aInitialX, int aInitialY, int aXpad, int aYpad)
rows
* cols
components of
parent
in a grid. Each component in a column is as wide as the
maximum preferred width of the components in that column; height is
similarly determined for each row. The parent is made just big enough to
fit them all.
aContainer
- the container to layout. Must have a SpringLayout as layout
manager;aRows
- number of rowsaCols
- number of columnsaInitialX
- x location to start the grid ataInitialY
- y location to start the grid ataXpad
- x padding between cellsaYpad
- y padding between cellspublic static void makeEditorGrid(Container aContainer, int aInitialX, int aInitialY)
aContainer
- the container to layout. Must have a SpringLayout as layout
manager;aInitialX
- the initial X-padding (left side);aInitialY
- the initial Y-padding (top side).makeCompactGrid(Container, int, int, int, int, int, int)
public static void makeGrid(Container aContainer, int aRows, int aCols, int aInitialX, int aInitialY, int aXpad, int aYpad)
rows
* cols
components of
parent
in a grid. Each component is as big as the maximum
preferred width and height of the components. The parent is made just big
enough to fit them all.
aContainer
- the container to layout. Must have a SpringLayout as layout
manager;aRows
- number of rowsaCols
- number of columnsaInitialX
- x location to start the grid ataInitialY
- y location to start the grid ataXpad
- x padding between cellsaYpad
- y padding between cellspublic static JComponent setSeparatorProperty(JComponent aComponent)
aComponent
- the component to mark as "separator", cannot be null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |