public static class BasicOptionPaneUI.ButtonAreaLayout extends Object implements LayoutManager
ButtonAreaLayout
表现以类似的方式来
FlowLayout
。它将所有的组件从左到右。如果
syncAllWidths
是真实的,每个组件的宽度将设置为最大尺寸宽度优先。这个类应该被视为一个“受保护的”内部类。它只有在实例化子类
BasicOptionPaneUI
。
Modifier and Type | Field and Description |
---|---|
protected boolean |
centersChildren
如果是真的,孩子们被集中在一起在父母。
|
protected int |
padding |
protected boolean |
syncAllWidths |
Constructor and Description |
---|
ButtonAreaLayout(boolean syncAllWidths, int padding) |
Modifier and Type | Method and Description |
---|---|
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) |
protected boolean syncAllWidths
protected int padding
protected boolean centersChildren
public void setSyncAllWidths(boolean newValue)
public boolean getSyncAllWidths()
public void setPadding(int newPadding)
public int getPadding()
public void setCentersChildren(boolean newValue)
public boolean getCentersChildren()
public void addLayoutComponent(String string, Component comp)
LayoutManager
comp
的布局,将其与指定的字符串
name
。
addLayoutComponent
接口
LayoutManager
string
要与组件关联的字符串
comp
-要添加的组件
public void layoutContainer(Container container)
LayoutManager
layoutContainer
接口
LayoutManager
container
-容器被设置
public Dimension minimumLayoutSize(Container c)
LayoutManager
minimumLayoutSize
接口
LayoutManager
c
-被设置的组件
LayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension preferredLayoutSize(Container c)
LayoutManager
preferredLayoutSize
接口
LayoutManager
c
-容器被设置
LayoutManager.minimumLayoutSize(java.awt.Container)
public void removeLayoutComponent(Component c)
LayoutManager
removeLayoutComponent
接口
LayoutManager
c
-要移除的组件
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.