AWT LayoutManager2 接口
简介
接口LayoutManger用于定义知道如何根据布局约束对象布局容器的类的接口。
类声明
以下是 java.awt.LayoutManager2 接口的声明:
public interface LayoutManger2
extends LayoutManager
接口方法
| S.N. | 方法 &描述 |
|---|---|
| 1 | void addLayoutComponent(Component comp, Object Constraints) 使用指定的约束对象将指定的组件添加到布局中。 |
| 2 | float getLayoutAlignmentX(Container target) 返回沿 x 轴的对齐方式。 |
| 3 | float getLayoutAlignmentY(Container target) 返回沿 y 轴的对齐方式。 |
| 4 | void invalidateLayout(Container target) 使布局无效,表示如果布局管理器有缓存信息,则应该丢弃。 |
| 5 | Dimension maximumLayoutSize(Container target) 根据指定容器所含的组件,计算其最大尺寸。 |

awt_layouts.html