FileDocCategorySizeDatePackage
LayoutManager2.javaAPI DocJava SE 5 API2464Fri Aug 26 14:56:46 BST 2005java.awt

LayoutManager2

public interface LayoutManager2 implements LayoutManager
Defines an interface for classes that know how to layout Containers based on a layout constraints object. This interface extends the LayoutManager interface to deal with layouts explicitly in terms of constraint objects that specify how and where components should be added to the layout.

This minimal extension to LayoutManager is intended for tool providers who wish to the creation of constraint-based layouts. It does not yet provide full, general support for custom constraint-based layout managers.

see
LayoutManager
see
Container
version
1.14, 12/19/03
author
Jonni Kanerva

Fields Summary
Constructors Summary
Methods Summary
public voidaddLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
Adds the specified component to the layout, using the specified constraint object.

param
comp the component to be added
param
constraints where/how the component is added to the layout.

public floatgetLayoutAlignmentX(java.awt.Container target)
Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

public floatgetLayoutAlignmentY(java.awt.Container target)
Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

public voidinvalidateLayout(java.awt.Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.

public java.awt.DimensionmaximumLayoutSize(java.awt.Container target)
Calculates the maximum size dimensions for the specified container, given the components it contains.

see
java.awt.Component#getMaximumSize
see
LayoutManager