kcl.waterloo.swing.layout
Class SpringGridLayout
- java.lang.Object
-
- javax.swing.SpringLayout
-
- kcl.waterloo.swing.layout.SpringGridLayout
-
- All Implemented Interfaces:
- java.awt.LayoutManager, java.awt.LayoutManager2
public class SpringGridLayout extends javax.swing.SpringLayoutSpringGridLayoutprovides a simple grid layout that resizes automatically when the host container is revalidated. Create aSpringGridLayoutsupplying 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.
-
-
Constructor Summary
Constructors Constructor and Description SpringGridLayout()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidlayoutContainer(java.awt.Container parent)Layouts out the parent container according to the current layout.
-
-
-
Method Detail
-
layoutContainer
public final void layoutContainer(java.awt.Container parent)
Layouts out the parent container according to the current layout. Constraints will be updated whenlayoutContaineris called - typically from its Component ancestor.- Specified by:
layoutContainerin interfacejava.awt.LayoutManager- Overrides:
layoutContainerin classjavax.swing.SpringLayout- Parameters:
parent- the container managed by this layout manager.
-
-
DMelt 3.0 © DataMelt by jWork.ORG