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


Java HorizontalListBuilder类代码示例

本文整理汇总了Java中net.sf.dynamicreports.report.builder.component.HorizontalListBuilder的典型用法代码示例。如果您正苦于以下问题:Java HorizontalListBuilder类的具体用法?Java HorizontalListBuilder怎么用?Java HorizontalListBuilder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


HorizontalListBuilder类属于net.sf.dynamicreports.report.builder.component包,在下文中一共展示了HorizontalListBuilder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: printActivities

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private void printActivities(Page bean) {
    CommentService commentService = AppContextUtil.getSpringBean(CommentService.class);
    final CommentSearchCriteria commentCriteria = new CommentSearchCriteria();
    commentCriteria.setType(StringSearchField.and(ProjectTypeConstants.PAGE));
    commentCriteria.setTypeId(StringSearchField.and(bean.getPath()));
    final int commentCount = commentService.getTotalCount(commentCriteria);
    HorizontalListBuilder historyHeader = cmp.horizontalList().add(cmp.text("Comments (" + commentCount + ")")
            .setStyle(getReportStyles().getH3Style()));
    titleContent.add(historyHeader, getReportStyles().line(), cmp.verticalGap(10));

    List<SimpleComment> comments = (List<SimpleComment>) commentService.findPageableListByCriteria(new BasicSearchRequest<>(commentCriteria));
    Collections.sort(comments, dateComparator.reverse());
    for (SimpleComment activity : comments) {
        titleContent.add(buildCommentBlock(activity), cmp.verticalGap(10));
    }
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:17,代码来源:PageReportTemplateExecutor.java

示例2: build

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private void build() {
	try {
		ImageBuilder image = cmp.image(new ImageExpression()).setFixedDimension(48, 48);
		HorizontalListBuilder itemComponent = cmp.horizontalList(
			image,
			cmp.verticalList(
				cmp.text(new ItemExpression()),
				bcode.ean128(new BarcodeExpression()).setFixedHeight(24)));

		report()
		  .setTemplate(Templates.reportTemplate)
		  .fields(
		  	field("image", String.class),
		  	field("barcode", String.class))
		  .columns(
		  	col.componentColumn("Image", image),
		  	col.column("Item", "item", type.stringType()),
		  	col.componentColumn("Item",	itemComponent))
		  .title(Templates.createTitleComponent("ComponentColumn"))
		  .pageFooter(Templates.footerComponent)
		  .setDataSource(createDataSource())
		  .show();
	} catch (DRException e) {
		e.printStackTrace();
	}
}
 
开发者ID:svn2github,项目名称:dynamicreports-jasper,代码行数:27,代码来源:ComponentColumnReport.java

示例3: countryHeadingComponent

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private ComponentBuilder<?, ?> countryHeadingComponent() {
	HorizontalListBuilder headingComponent = cmp.horizontalList();

	HyperLinkBuilder countryReferenceHyperLink = hyperLink();
	countryReferenceHyperLink.setAnchor(new CountryExpression(referenceField));
	countryReferenceHyperLink.setType(HyperLinkType.LOCAL_ANCHOR);

	StyleBuilder style = stl.style(Templates.rootStyle)
		.setFontSize(12)
		.bold()
		.setBackgroundColor(Color.LIGHT_GRAY);

	TextFieldBuilder<String> textComponent = cmp.text(textField)
			.setHyperLink(countryReferenceHyperLink)
			.setStyle(style);
	headingComponent.add(textComponent);

	TextFieldBuilder<String> pageIndexComponent = cmp.text(new CountryHeadingExpression())
		.setHyperLink(countryReferenceHyperLink)
		.setStyle(style)
		.setHorizontalAlignment(HorizontalAlignment.RIGHT);
	headingComponent.add(pageIndexComponent);

	return headingComponent;
}
 
开发者ID:svn2github,项目名称:dynamicreports-jasper,代码行数:26,代码来源:SalesTableOfContentsDesign.java

示例4: barcode4j

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private ComponentBuilder<?, ?> barcode4j() {
	HorizontalListBuilder list = cmp.horizontalFlowList();
	list.setGap(10);
	list.add(
		barcode("Codabar", bcode.codabar("12345678")),
		barcode("Code128", bcode.code128("12345678")),
		barcode("Ean128", bcode.ean128("12345678")),
		barcode("DataMatrix", bcode.dataMatrix("12345678")),
		barcode("Code39", bcode.code39("12345678")),
		barcode("Interleaved2Of5", bcode.interleaved2Of5("12345678")),
		barcode("Upca", bcode.upca("11000000000")),
		barcode("Upce", bcode.upce("1100000")),
		barcode("Ean13", bcode.ean13("110000000000")),
		barcode("Ean8", bcode.ean8("1100000")),
		barcode("UspsIntelligentMail", bcode.uspsIntelligentMail("34160265194042788110")),
		barcode("RoyalMailCustomer", bcode.royalMailCustomer("34160265194042788110")),
		barcode("Postnet", bcode.postnet("12345678")),
		barcode("Pdf417", bcode.pdf417("12345678")));
	return list;
}
 
开发者ID:svn2github,项目名称:dynamicreports-jasper,代码行数:21,代码来源:BarcodeReport.java

示例5: build

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private void build() {
	ComponentBuilder<?, ?> cardComponent = createCardComponent();
	HorizontalListBuilder cards = cmp.horizontalFlowList();
	for (int i = 0; i < 10; i++) {
		cards.add(cardComponent);
	}

	try {
		report()
		  .setTemplate(Templates.reportTemplate)
		  .setTextStyle(stl.style())
		  .setPageFormat(PageType.A5)
		  .title(
		  	Templates.createTitleComponent("Card"),
		  	cards)
		  .show();
	} catch (DRException e) {
		e.printStackTrace();
	}
}
 
开发者ID:svn2github,项目名称:dynamicreports-jasper,代码行数:21,代码来源:CardReport.java

示例6: createCardComponent

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private ComponentBuilder<?, ?> createCardComponent() {
	HorizontalListBuilder cardComponent = cmp.horizontalList();
	StyleBuilder cardStyle = stl.style(stl.pen1Point())
	                            .setPadding(10);
	cardComponent.setStyle(cardStyle);

	ImageBuilder image = cmp.image(Templates.class.getResource("images/user_male.png")).setFixedDimension(60, 60);
	cardComponent.add(cmp.hListCell(image).heightFixedOnMiddle());
	cardComponent.add(cmp.horizontalGap(10));

	StyleBuilder boldStyle = stl.style().bold();
	VerticalListBuilder content = cmp.verticalList(
		cmp.text("Name:").setStyle(boldStyle),
		cmp.text("Peter Marsh"),
		cmp.text("Address:").setStyle(boldStyle),
		cmp.text("23 Baden Av."),
		cmp.text("City:").setStyle(boldStyle),
		cmp.text("New York"));

	cardComponent.add(content);
	return cardComponent;
}
 
开发者ID:svn2github,项目名称:dynamicreports-jasper,代码行数:23,代码来源:CardReport.java

示例7: createNameComponent

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private static ComponentBuilder<?, ?> createNameComponent(String lastName, String firstName)
{
    final HorizontalListBuilder list = cmp.horizontalList().setBaseStyle(stl.style().setTopBorder(stl.pen1Point()).setLeftPadding(10));
    addAddressAttribute(list, "Address", "", true);
    addAddressAttribute(list, "", "", true);
    addAddressAttribute(list, "", "", true);
    addAddressAttribute(list, "Phone", "", true);
    final HorizontalListBuilder title = cmp.horizontalFlowList();
    title.add(cmp.text(String.format("Donor: %s %s", firstName, lastName)).setStyle(Templates.boldStyle)).newRow();
    return cmp.verticalList(title, list);
}
 
开发者ID:jefflward,项目名称:First-Fruits,代码行数:12,代码来源:GivingStatementWriter.java

示例8: createChurchAddressComponent

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private static ComponentBuilder<?, ?> createChurchAddressComponent()
{
    final HorizontalListBuilder list = cmp.horizontalList().setBaseStyle(stl.style().setTopBorder(stl.pen1Point()).setLeftPadding(10));
    addAddressAttribute(list, "Address", Settings.getInstance().getStringValue(Settings.ADDRESS1), false);
    addAddressAttribute(list, "", Settings.getInstance().getStringValue(Settings.ADDRESS2), false);
    final String city = Settings.getInstance().getStringValue(Settings.CITY);
    final String state = Settings.getInstance().getStringValue(Settings.STATE);
    final String zip = Settings.getInstance().getStringValue(Settings.ZIP);
    final String cityStateZip = String.format("%s, %s %s", city, state, zip);
    addAddressAttribute(list, "", cityStateZip, false);
    addAddressAttribute(list, "Phone", Settings.getInstance().getStringValue(Settings.PHONE), false);
    final HorizontalListBuilder title = cmp.horizontalFlowList();
    title.add(cmp.text(Settings.getInstance().getStringValue(Settings.CHURCH_NAME_KEY)).setStyle(Templates.boldStyle)).newRow();
    return cmp.verticalList(title, list);
}
 
开发者ID:jefflward,项目名称:First-Fruits,代码行数:16,代码来源:GivingStatementWriter.java

示例9: addAddressAttribute

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private static void addAddressAttribute(HorizontalListBuilder list, String label, String value, boolean allowEmptyValue) {
    if (allowEmptyValue || (value != null && !value.isEmpty())) {
        if (label != null && !label.isEmpty()) {
            list.add(cmp.text(label + ":").setFixedColumns(8).setStyle(Templates.boldStyle), cmp.text(value)).newRow();
        } else {
            list.add(cmp.text("").setFixedColumns(8).setStyle(Templates.boldStyle), cmp.text(value)).newRow();
        }
    }
}
 
开发者ID:jefflward,项目名称:First-Fruits,代码行数:10,代码来源:GivingStatementWriter.java

示例10: buildCommentBlock

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private ComponentBuilder buildCommentBlock(SimpleComment comment) {
    TextFieldBuilder<String> authorField = cmp.text(StringUtils.trimHtmlTags(UserUIContext.getMessage(GenericI18Enum.EXT_ADDED_COMMENT, comment.getOwnerFullName(),
            UserUIContext.formatPrettyTime(comment.getCreatedtime())), Integer.MAX_VALUE)).setStyle(getReportStyles().getMetaInfoStyle());
    HorizontalListBuilder infoHeader = cmp.horizontalFlowList().add(authorField);
    return cmp.verticalList(infoHeader, cmp.text(StringUtils.trimHtmlTags(comment.getComment(), Integer.MAX_VALUE)))
            .setStyle(getReportStyles().getBorderStyle());
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:8,代码来源:PageReportTemplateExecutor.java

示例11: createHorizontalList

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private ComponentBuilder<?, ?> createHorizontalList() {
	HorizontalListBuilder horizontalList = cmp.horizontalList();
	for (int i = 0; i < 10; i++) {
		horizontalList.add(cmp.text("").setStyle(borderedStyle));
	}
	return horizontalList;
}
 
开发者ID:svn2github,项目名称:dynamicreports-jasper,代码行数:8,代码来源:ContainerReport.java

示例12: createMultiRowHorizontalList

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private ComponentBuilder<?, ?> createMultiRowHorizontalList() {
	HorizontalListBuilder horizontalList = cmp.horizontalList();
	for (int i = 0; i < 3; i++) {
		horizontalList.add(cmp.text("").setStyle(borderedStyle));
	}
	horizontalList.newRow();
	for (int i = 0; i < 7; i++) {
		horizontalList.add(cmp.text("").setStyle(borderedStyle));
	}
	return horizontalList;
}
 
开发者ID:svn2github,项目名称:dynamicreports-jasper,代码行数:12,代码来源:ContainerReport.java

示例13: createHorizontalFlowList

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private ComponentBuilder<?, ?> createHorizontalFlowList() {
	HorizontalListBuilder horizontalList = cmp.horizontalFlowList();
	for (int i = 0; i < 9; i++) {
		horizontalList.add(cmp.text("").setStyle(borderedStyle));
	}
	return horizontalList;
}
 
开发者ID:svn2github,项目名称:dynamicreports-jasper,代码行数:8,代码来源:ContainerReport.java

示例14: createNestedList

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private ComponentBuilder<?, ?> createNestedList() {
	HorizontalListBuilder horizontalList = cmp.horizontalList();
	for (int i = 0; i < 3; i++) {
		horizontalList.add(createVerticalList());
	}
	return horizontalList;
}
 
开发者ID:svn2github,项目名称:dynamicreports-jasper,代码行数:8,代码来源:ContainerReport.java

示例15: createCustomerComponent

import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入依赖的package包/类
private ComponentBuilder<?, ?> createCustomerComponent(String label, Customer customer) {
	HorizontalListBuilder list = cmp.horizontalList().setBaseStyle(stl.style().setTopBorder(stl.pen1Point()).setLeftPadding(10));
	addCustomerAttribute(list, "Name", customer.getName());
	addCustomerAttribute(list, "Address", customer.getAddress());
	addCustomerAttribute(list, "City", customer.getCity());
	addCustomerAttribute(list, "Email", customer.getEmail());
	return cmp.verticalList(
						cmp.text(label).setStyle(Templates.boldStyle),
						list);
}
 
开发者ID:svn2github,项目名称:dynamicreports-jasper,代码行数:11,代码来源:InvoiceDesign.java


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