LayoutManager2 接口
介紹
是用來定義的接口的類知道如何布置根據布局約束對象的容器的接口LayoutManger。
類的聲明
以下是聲明的java.awt.LayoutManager2接口:
public interface LayoutManger2 extends LayoutManager
接口中的方法
S.N. | 方法和說明 |
---|---|
1 |
void addLayoutComponent(Component comp, Object constraints) Adds the specified component to the layout, using the specified constraint object. |
2 |
float getLayoutAlignmentX(Container target) Returns the alignment along the x axis. |
3 |
float getLayoutAlignmentY(Container target) Returns the alignment along the y axis. |
4 |
void invalidateLayout(Container target) Invalidates the layout, indicating that if the layout manager has cached information it should be discarded. |
5 |
Dimension maximumLayoutSize(Container target) Calculates the maximum size dimensions for the specified container, given the components it contains. |