JavaTM 2 Platform
Standard Ed. 6

javax.swing.plaf.basic
类 BasicOptionPaneUI.ButtonAreaLayout

java.lang.Object
  继承者 javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
所有已实现的接口:
LayoutManager
正在封闭类:
BasicOptionPaneUI

public static class BasicOptionPaneUI.ButtonAreaLayout
extends Object
implements LayoutManager

ButtonAreaLayout 的行为方式类似于 FlowLayout。它从左到右布置所有组件。如果 syncAllWidths 为 true,则将每个组件的宽度设置为最大首选大小的宽度。 因编辑器故障而将此内部类标记为“公开”。此类应该视为“受保护”内部类。仅在 BasicOptionPaneUI 的子类中实例化此类。


字段摘要
protected  boolean centersChildren
          如果为 true,则子级将在父级中汇总在一起。
protected  int padding
           
protected  boolean syncAllWidths
           
 
构造方法摘要
BasicOptionPaneUI.ButtonAreaLayout(boolean syncAllWidths, int padding)
           
 
方法摘要
 void addLayoutComponent(String string, Component comp)
          如果布局管理器使用每组件字符串,则将组件 comp 添加到布局,并将它与 name 指定的字符串关联。
 boolean getCentersChildren()
           
 int getPadding()
           
 boolean getSyncAllWidths()
           
 void layoutContainer(Container container)
          布置指定容器。
 Dimension minimumLayoutSize(Container c)
          给定指定容器所包含的组件,计算该容器的最小大小维数。
 Dimension preferredLayoutSize(Container c)
          给定指定容器所包含的组件,计算该容器的首选大小维数。
 void removeLayoutComponent(Component c)
          从布局移除指定组件。
 void setCentersChildren(boolean newValue)
           
 void setPadding(int newPadding)
           
 void setSyncAllWidths(boolean newValue)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

syncAllWidths

protected boolean syncAllWidths

padding

protected int padding

centersChildren

protected boolean centersChildren
如果为 true,则子级将在父级中汇总在一起。

构造方法详细信息

BasicOptionPaneUI.ButtonAreaLayout

public BasicOptionPaneUI.ButtonAreaLayout(boolean syncAllWidths,
                                          int padding)
方法详细信息

setSyncAllWidths

public void setSyncAllWidths(boolean newValue)

getSyncAllWidths

public boolean getSyncAllWidths()

setPadding

public void setPadding(int newPadding)

getPadding

public int getPadding()

setCentersChildren

public void setCentersChildren(boolean newValue)

getCentersChildren

public boolean getCentersChildren()

addLayoutComponent

public void addLayoutComponent(String string,
                               Component comp)
从接口 LayoutManager 复制的描述
如果布局管理器使用每组件字符串,则将组件 comp 添加到布局,并将它与 name 指定的字符串关联。

指定者:
接口 LayoutManager 中的 addLayoutComponent
参数:
string - 要与组件关联的字符串
comp - 要添加的组件

layoutContainer

public void layoutContainer(Container container)
从接口 LayoutManager 复制的描述
布置指定容器。

指定者:
接口 LayoutManager 中的 layoutContainer
参数:
container - 要布置的容器

minimumLayoutSize

public Dimension minimumLayoutSize(Container c)
从接口 LayoutManager 复制的描述
给定指定容器所包含的组件,计算该容器的最小大小维数。

指定者:
接口 LayoutManager 中的 minimumLayoutSize
参数:
c - 要布置的组件

preferredLayoutSize

public Dimension preferredLayoutSize(Container c)
从接口 LayoutManager 复制的描述
给定指定容器所包含的组件,计算该容器的首选大小维数。

指定者:
接口 LayoutManager 中的 preferredLayoutSize
参数:
c - 要布置的容器
另请参见:
LayoutManager.minimumLayoutSize(java.awt.Container)

removeLayoutComponent

public void removeLayoutComponent(Component c)
从接口 LayoutManager 复制的描述
从布局移除指定组件。

指定者:
接口 LayoutManager 中的 removeLayoutComponent
参数:
c - 要移除的组件

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java 2 SDK SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策