All Packages Class Hierarchy This Package Previous Next Index
Interface java.awt.LayoutManager2
- public interface LayoutManager2
- extends 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 Also:
- LayoutManager, Container
-
addLayoutComponent(Component, Object)
- Adds the specified component to the layout, using the specified
constraint object.
-
getLayoutAlignmentX(Container)
- Returns the alignment along the x axis.
-
getLayoutAlignmentY(Container)
- Returns the alignment along the y axis.
-
invalidateLayout(Container)
- Invalidates the layout, indicating that if the layout manager
has cached information it should be discarded.
-
maximumLayoutSize(Container)
-
Returns the maximum size of this component.
addLayoutComponent
method addLayoutComponent(comp=Component, -
constraints=Object) public abstract
- Adds the specified component to the layout, using the specified
constraint object.
- Parameters:
- comp - the component to be added
- constraints - where/how the component is added to the layout.
maximumLayoutSize
method maximumLayoutSize(target=Container) returns Dimension public abstract
- Returns the maximum size of this component.
- See Also:
- getMinimumSize, getPreferredSize, LayoutManager
getLayoutAlignmentX
method getLayoutAlignmentX(target=Container) returns float public abstract
- 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.
getLayoutAlignmentY
method getLayoutAlignmentY(target=Container) returns float public abstract
- 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.
invalidateLayout
method invalidateLayout(target=Container) public abstract
- Invalidates the layout, indicating that if the layout manager
has cached information it should be discarded.
All Packages Class Hierarchy This Package Previous Next Index