⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 groupflowlayoutconstraints.java

📁 本程序是有IBM开发的一个基于数据表格的组件,里面有相关的例子和DOC,本站资料仅为大家学习之用
💻 JAVA
字号:
package com.ibm.j2x.swing.layout;

import java.awt.Insets;

import javax.swing.SwingConstants;

/**
 * Specifies constraints used for laying out components in the GroupFlowLayout
 * @author MAbernethy 
 */
public class GroupFlowLayoutConstraints
{	
	/** The group the component should be grouped with */
	public int group = SwingConstants.LEFT;
	/** The insets used for padding around each component */
	public Insets insets;
	
	/**
	 * Creates a GroupFlowLayoutConstraints object in the left group
	 * with a 3 inset all around.
	 */
	public GroupFlowLayoutConstraints()
	{
		this(SwingConstants.LEFT, new Insets(3,3,3,3));
	}
	
	/**
	 * Creates a GroupFlowLayoutConstaint object in the specified group
	 * with the specified padding around the component.
	 * @param group the group the component is to be grouped with
	 * @param insets the padding around the component
	 */
	public GroupFlowLayoutConstraints(int group, Insets insets)
	{
		if (group != SwingConstants.RIGHT && group != SwingConstants.CENTER && group != SwingConstants.LEFT)
			throw new IllegalArgumentException("Inappropriate Argument.  Must be SwingConstant.LEFT, CENTER, or RIGHT");
		this.group = group;
		this.insets = insets;	
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -