本文整理汇总了Java中net.sf.dynamicreports.report.builder.component.HorizontalListBuilder.add方法的典型用法代码示例。如果您正苦于以下问题:Java HorizontalListBuilder.add方法的具体用法?Java HorizontalListBuilder.add怎么用?Java HorizontalListBuilder.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.dynamicreports.report.builder.component.HorizontalListBuilder
的用法示例。
在下文中一共展示了HorizontalListBuilder.add方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: 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();
}
}
示例4: 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;
}
示例5: 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;
}
示例6: 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;
}
示例7: 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;
}
示例8: 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;
}
示例9: textCell
import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入方法依赖的package包/类
private HorizontalListBuilder textCell(String text, int size) {
HorizontalListBuilder list = cmp.horizontalList();
String cellText = StringUtils.rightPad(text, size);
cellText = StringUtils.left(cellText, size);
for (char character : cellText.toCharArray()) {
TextFieldBuilder<String> cell = cmp.text(String.valueOf(character))
.setStyle(cellStyle)
.setFixedDimension(cellWidth, cellHeight);
list.add(cell);
}
return list;
}
示例10: components
import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入方法依赖的package包/类
private ComponentBuilder<?, ?> components(String label1, ComponentBuilder<?, ?> component1, String label2, ComponentBuilder<?, ?> component2, String label3, ComponentBuilder<?, ?> component3) {
HorizontalListBuilder list = cmp.horizontalList()
.setGap(10);
list.add(component(label1, component1));
list.add(component(label2, component2));
list.add(component(label3, component3));
return list;
}
示例11: barbecue
import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入方法依赖的package包/类
private ComponentBuilder<?, ?> barbecue() {
HorizontalListBuilder list = cmp.horizontalFlowList();
list.setGap(10);
list.add(
barcode("2of7", bcode.barbecue_2of7("12345678")),
barcode("3of9", bcode.barbecue_3of9("12345678")),
barcode("Bookland", bcode.barbecue_bookland("1234567890")),
barcode("Codabar", bcode.barbecue_codabar("12345678")),
barcode("Code128", bcode.barbecue_code128("12345678")),
barcode("Code128A", bcode.barbecue_code128A("12345678")),
barcode("Code128B", bcode.barbecue_code128B("12345678")),
barcode("Code128C", bcode.barbecue_code128C("12345678")),
barcode("Code39", bcode.barbecue_code39("12345678")),
barcode("Code39 Extended", bcode.barbecue_code39Extended("12345678")),
barcode("Ean128", bcode.barbecue_ean128("12345678")),
barcode("Ean13", bcode.barbecue_ean13("123456789012")),
barcode("GlobalTradeItemNumber", bcode.barbecue_globalTradeItemNumber("12345678")),
barcode("Int2of5", bcode.barbecue_int2of5("12345678")),
barcode("Monarch", bcode.barbecue_monarch("12345678")),
barcode("Nw7", bcode.barbecue_nw7("12345678")),
barcode("Pdf417", bcode.barbecue_pdf417("12345678")),
barcode("Postnet", bcode.barbecue_postnet("12345678")),
barcode("RandomWeightUpca", bcode.barbecue_randomWeightUpca("12345678901")),
barcode("Scc14ShippingCode", bcode.barbecue_scc14ShippingCode("12345678")),
barcode("ShipmentIdentificationNumber", bcode.barbecue_shipmentIdentificationNumber("12345678")),
barcode("Sscc18", bcode.barbecue_sscc18("12345678")),
barcode("Std2of5", bcode.barbecue_std2of5("12345678")),
barcode("Ucc128", bcode.barbecue_ucc128("12345678").setApplicationIdentifierExpression("123")),
barcode("Upca", bcode.barbecue_upca("12345678901")),
barcode("Usd3", bcode.barbecue_usd3("12345678")),
barcode("Usd4", bcode.barbecue_usd4("12345678")),
barcode("Usps", bcode.barbecue_usps("12345678")));
return list;
}
示例12: createReport
import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入方法依赖的package包/类
private JasperReportBuilder createReport()
{
final StyleBuilder boldStyle = stl.style().bold();
final StyleBuilder boldCenteredStyle = stl.style(boldStyle).setHorizontalAlignment(HorizontalAlignment.CENTER);
final StyleBuilder columnTitleStyle = stl.style(boldCenteredStyle)
.setBorder(stl.pen1Point())
.setBackgroundColor(Color.LIGHT_GRAY);
final TextColumnBuilder<String> categoryColumn = col.column("Category", "category", type.stringType());
final TextColumnBuilder<BigDecimal> currencyColumn = col.column("Currency", "currency", type.bigDecimalType());
final TextColumnBuilder<BigDecimal> checkColumn = col.column("Checks", "checks", type.bigDecimalType());
final TextColumnBuilder<BigDecimal> totalsColumn = col.column("Total", "total", type.bigDecimalType());
final JasperReportBuilder report = report()
.setTemplate(Templates.reportTemplate)
.setColumnTitleStyle(columnTitleStyle)
.highlightDetailEvenRows()
.columns(categoryColumn, currencyColumn, checkColumn, totalsColumn)
.title(cmp.verticalList()
.add(cmp.horizontalList()
.add(cmp.text(Settings.getInstance().getStringValue(Settings.CHURCH_NAME_KEY)).setStyle(boldStyle))
.add(cmp.text("Offering Date: " + RecordManager.getInstance().getSelectedDate()).setStyle(boldStyle).setHorizontalAlignment(HorizontalAlignment.RIGHT)))
.add(cmp.verticalGap(10)))
.pageFooter(cmp.pageXofY().setStyle(boldCenteredStyle))
.setDataSource(offeringPanel.createDataSource())
.subtotalsAtSummary(sbt.sum(currencyColumn), sbt.sum(checkColumn), sbt.sum(totalsColumn))
.setPageFormat(PageType.LETTER)
.setPageMargin(DynamicReports.margin(20));
final VerticalListBuilder summary = cmp.verticalList();
final OfferingReportSettings offeringReportSettings = offeringPanel.getOfferingReportSettings();
if (offeringReportSettings.includeContributions) {
summary.add(cmp.verticalGap(30));
summary.add(cmp.subreport(createRecordsSubReport(offeringReportSettings.includeDonorNames)));
}
if (offeringReportSettings.includeSignatures) {
summary.add(cmp.verticalGap(30));
final HorizontalListBuilder signatures = cmp.horizontalList();
final VerticalListBuilder signature1 = cmp.verticalList();
signature1.add(cmp.filler().setFixedDimension(200, 10).setStyle(stl.style().setTopBorder(stl.pen1Point())));
signature1.add(cmp.text(offeringReportSettings.signature1).setStyle(stl.style()));
signatures.add(signature1);
final VerticalListBuilder signature2 = cmp.verticalList();
signature2.add(cmp.filler().setFixedDimension(200, 10).setStyle(stl.style().setTopBorder(stl.pen1Point())));
signature2.add(cmp.text(offeringReportSettings.signature2).setStyle(stl.style()));
signatures.add(signature2);
summary.add(signatures);
}
report.summary(summary);
return report;
}
示例13: configureReport
import net.sf.dynamicreports.report.builder.component.HorizontalListBuilder; //导入方法依赖的package包/类
@Override
protected void configureReport(JasperReportBuilder rb) {
VerticalListBuilder list1 = cmp.verticalList();
list1.add(cmp.text(""));
list1.add(cmp.text(""));
list1.setFixedWidth(50);
HorizontalListBuilder list2 = cmp.horizontalList();
list2.add(cmp.text(""));
list2.add(cmp.text(""));
list2.setFixedWidth(150);
VerticalListBuilder list3 = cmp.verticalList();
list3.add(cmp.text(""));
list3.add(cmp.text(""));
list3.setFixedWidth(200);
HorizontalListBuilder list4 = cmp.horizontalList();
list4.add(cmp.text(""));
list4.add(cmp.text(""));
list4.setFixedWidth(500);
VerticalListBuilder list5 = cmp.verticalList();
list5.add(cmp.text(""));
list5.add(cmp.text(""));
list5.setFixedHeight(50);
HorizontalListBuilder list6 = cmp.horizontalList();
list6.add(cmp.text(""));
list6.add(cmp.text(""));
list6.setFixedHeight(40);
HorizontalListBuilder list7 = cmp.horizontalList();
list7.add(cmp.text("").setFixedWidth(30));
list7.add(cmp.text(""));
list7.setFixedWidth(150);
VerticalListBuilder list8 = cmp.verticalList();
list8.add(cmp.text("").setFixedHeight(20));
list8.add(cmp.text(""));
list8.setFixedHeight(50);
VerticalListBuilder list9 = cmp.verticalList();
list9.add(cmp.text(""));
list9.add(cmp.text(""));
list9.setFixedDimension(250, 40);
HorizontalListBuilder list10 = cmp.horizontalList();
list10.add(cmp.text(""));
list10.add(cmp.text(""));
list10.setFixedDimension(250, 40);
rb.title(
list1, list2, list3, list4, list5, list6, list7, list8, list9, list10);
}