当前位置: 首页>>代码示例>>Java>>正文


Java DefaultFormBuilder.appendRow方法代码示例

本文整理汇总了Java中com.jgoodies.forms.builder.DefaultFormBuilder.appendRow方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultFormBuilder.appendRow方法的具体用法?Java DefaultFormBuilder.appendRow怎么用?Java DefaultFormBuilder.appendRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jgoodies.forms.builder.DefaultFormBuilder的用法示例。


在下文中一共展示了DefaultFormBuilder.appendRow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildSubForm

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
private JComponent buildSubForm(SubForm subForm, Map<String, JComponent> mapComponents, List<String> fieldIdList,
		Map<String, Object> extraObjects) {
	//panel.setCaption(formEditor.getName());
	StringBuilder buff = new StringBuilder("right:max(40dlu;pref), 3dlu, 20dlu:grow");
	for (int i = 1; i < subForm.getColumns(); i++) {
		buff.append(", 7dlu, right:max(40dlu;pref), 3dlu, 20dlu:grow");
	}
	FormLayout layout = new FormLayout(buff.toString(), ""); // add rows dynamically
	DefaultFormBuilder builder = new DefaultFormBuilder(layout);
	for (int row = 0; row < subForm.getRows(); row++) {
		for (int column = 0; column < subForm.getColumns(); column++) {
			Component component = subForm.getField(row, column);
			if (component == null) {
				builder.nextColumn(4);
			} else if (component instanceof Field) {
				Field editor = (Field) component;
				buildField(builder, editor, mapComponents, fieldIdList, extraObjects);
			} else {
				throw new UnsupportedOperationException("A subform contains a component that is not a field");
			}
		}
		builder.nextLine();
		builder.appendRow(FormSpecs.LINE_GAP_ROWSPEC);
		builder.nextLine();
		builder.appendRow("max(6dlu;pref)");
	}
	return builder.build();
}
 
开发者ID:frincon,项目名称:abstractform,代码行数:29,代码来源:SwingFormToolkit.java

示例2: initializeCoverPanel

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
private void initializeCoverPanel()
{
	FormLayout layout = new FormLayout("left:max(40dlu;pref), 3dlu, pref:grow", "");
	DefaultFormBuilder builder = new DefaultFormBuilder(layout);
	coverPanel = builder.getPanel();
	this.builder.appendRow(builder.getLineGapSpec());
	this.builder.nextLine();
	this.builder.appendRow("fill:pref:grow");
	this.builder.append(coverPanel, 6);
	
	coverSenderTextField = new JTextField(DEFAULT_COLUMNS);
	coverSenderTextField.setText(Settings.FULLNAME.getValue());
	coverSenderLabel = builder.append("", coverSenderTextField);
	builder.nextLine();
	
	coverRecepientTextField = new JTextField(DEFAULT_COLUMNS);
	coverRecepientLabel = builder.append("", coverRecepientTextField);
	builder.nextLine();
	
	coverSubjectTextField = new JTextField(DEFAULT_COLUMNS);
	coverSubjectLabel = builder.append("", coverSubjectTextField);
	builder.nextLine();
	
	coverCommentTextArea= new JTextArea(3, DEFAULT_COLUMNS);
	coverCommentLabel = builder.append("");
	builder.appendRow("fill:pref:grow"); // second row for text area
	CellConstraints cc = new CellConstraints();
	coverCommentScrollPane = new JScrollPane(coverCommentTextArea);
	builder.add(coverCommentScrollPane,
			cc.xywh(builder.getColumn(), builder.getRow(), 1, 2));
	builder.nextLine(2);
}
 
开发者ID:Distrotech,项目名称:jhylafax,代码行数:33,代码来源:SendDialog.java


注:本文中的com.jgoodies.forms.builder.DefaultFormBuilder.appendRow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。