JavaTM 2 Platform
Standard Ed. 6

类 java.awt.GridBagConstraints
的使用

使用 GridBagConstraints 的软件包
java.awt 包含用于创建用户界面和绘制图形图像的所有类。 
javax.swing.plaf.basic 提供了根据基本外观构建的用户界面对象。 
 

java.awt 中 GridBagConstraints 的使用
 

声明为 GridBagConstraints 的 java.awt 中的字段
protected  GridBagConstraints GridBagLayout.defaultConstraints
          此字段保持包含默认值的网格包约束实例,因此如果某个组件没有与其相关联的网格包约束,则会分配给该组件一个 defaultConstraints 的副本。
 

类型参数类型为 GridBagConstraints 的 java.awt 中的字段
protected  Hashtable<Component,GridBagConstraints> GridBagLayout.comptable
          此哈希表维持组件与其网格包约束之间的关联。
 

返回 GridBagConstraints 的 java.awt 中的方法
 GridBagConstraints GridBagLayout.getConstraints(Component comp)
          获取指定组件的约束。
protected  GridBagConstraints GridBagLayout.lookupConstraints(Component comp)
          检索指定组件的约束。
 

参数类型为 GridBagConstraints 的 java.awt 中的方法
protected  void GridBagLayout.adjustForGravity(GridBagConstraints constraints, Rectangle r)
          根据约束几何结构和填充将 x、y、宽度和高度四个字段调整为正确值。
protected  void GridBagLayout.AdjustForGravity(GridBagConstraints constraints, Rectangle r)
          此方法已过时,仅为提供向后兼容性;新代码应该调用 adjustForGravity 来代替。
 void GridBagLayout.setConstraints(Component comp, GridBagConstraints constraints)
          设置此布局中指定组件的约束条件。
 

javax.swing.plaf.basic 中 GridBagConstraints 的使用
 

参数类型为 GridBagConstraints 的 javax.swing.plaf.basic 中的方法
protected  void BasicOptionPaneUI.addMessageComponents(Container container, GridBagConstraints cons, Object msg, int maxll, boolean internallyCreated)
          创建表示 msg 的适当对象并将其置于 container 中。
 


JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only。