public class SpringGridLayout
extends javax.swing.SpringLayout
SpringGridLayout provides a simple grid layout that resizes
automatically when the host container is revalidated.
Create a SpringGridLayout supplying the number of rows and columns
for the grid. Components will be displayed in the grid in row-major order,
i.e. left-to-right, wrapping to a new row as required.
Components are drawn in the layout in the order maintained in the parent
component: i.e. the component returned by getComponent(0) will be drawn at
0,0; that returned getComponent(1) at 0,1 (assuming the number of columns
>=2. Components at indices >= m*n will not be visible.
Components can span more than 1 element of the grid in either or both the
x-direction and y-direction. To set the span to a value other than 1, use
setSpan, setSpanX or setSpanY.
Elements of the grid that are to the right and/or below a component with a
span>1 will share screen-space with that component. They should have their
Visible property set to false (unless they are intended to be drawn above the
component).
The dimensions of the grid can be altered by calling setGrid after it is
initiated and populated.
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.SpringLayout
javax.swing.SpringLayout.Constraints
Field Summary
Fields inherited from class javax.swing.SpringLayout
public final void layoutContainer(java.awt.Container parent)
Layouts out the parent container according to the current layout.
Constraints will be updated when layoutContainer is called -
typically from its Component ancestor.
Specified by:
layoutContainer in interface java.awt.LayoutManager
Overrides:
layoutContainer in class javax.swing.SpringLayout
Parameters:
parent - the container managed by this layout manager.