public interface LayoutManager2 extends LayoutManager
这最小的扩展的布局管理器是用于工具供应商希望基于约束的布局的创建。它还没有提供完整的,通用的支持自定义基于约束的布局管理器。
LayoutManager
,
Container
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(Component comp, Object constraints)
使用指定的约束对象将指定的组件添加到布局中。
|
float |
getLayoutAlignmentX(Container target)
返回沿X轴的对齐方式。
|
float |
getLayoutAlignmentY(Container target)
返回沿Y轴的对齐方式。
|
void |
invalidateLayout(Container target)
无效的布局,表明如果布局管理器已缓存的信息应该被丢弃。
|
Dimension |
maximumLayoutSize(Container target)
计算指定容器的最大大小尺寸,给出它所包含的组件。
|
addLayoutComponent, layoutContainer, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent
void addLayoutComponent(Component comp, Object constraints)
comp
-要添加的组件
constraints
- /组件添加到布局。
float getLayoutAlignmentX(Container target)
float getLayoutAlignmentY(Container target)
void invalidateLayout(Container target)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.