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.


上一篇: LayoutManager 介面 下一篇: AWT BorderLayout