/** * Create an instance of {@link Specification } * */ public Specification createSpecification() { return new Specification(); }
/** * Create an instance of {@link Column } * */ public Column createColumn() { return new Column(); }
/** * Create an instance of {@link Table } * */ public Table createTable() { return new Table(); }
private Head getTableHead() { Head head = new Head(); Row row = new Row(); Cell cellKey = new Cell(); cellKey.getContent().add("Key"); row.getCell().add(cellKey); Cell teValue = new Cell(); teValue.getContent().add("Value"); row.getCell().add(teValue); head.getRow().add(row); return head; }
public static Table build(List<Object[]> data) { Table table = new Table(); Content content = new Content(); content.getBody().add(buildBody(data)); table.setContent(content); return table; }
private Specification getSpecification() { Specification specification = new Specification(); Columns columns = new Columns(); columns.getColumn().add(ColumnFactory.create("left",2)); columns.getColumn().add(ColumnFactory.create("left",4)); specification.setColumns(columns); return specification; }
public static Cell image(Image image) { Cell cell = new Cell(); cell.getContent().add(image); return cell; } }
public static Column build(Horizontal hAlignment) { Column col = new Column(); col.setAlignment(XmlAlignmentFactory.buildHorizontal(hAlignment)); return col; }
/** * Create an instance of {@link Cell } * */ public Cell createCell() { return new Cell(); }
/** * Create an instance of {@link Row } * */ public Row createRow() { return new Row(); }
/** * Create an instance of {@link Columns } * */ public Columns createColumns() { return new Columns(); }
/** * Create an instance of {@link Head } * */ public Head createHead() { return new Head(); }
/** * Create an instance of {@link Body } * */ public Body createBody() { return new Body(); }
/** * Create an instance of {@link Content } * */ public Content createContent() { return new Content(); }
/** * Create an instance of {@link Foot } * */ public Foot createFoot() { return new Foot(); }
public static Table build(List<String> header, List<Object[]> data) { Table table = new Table(); Content content = new Content(); content.setHead(buildHead(header)); content.getBody().add(buildBody(data)); table.setContent(content); return table; }
private Head buildHead() { Row row = new Row(); row.getCell().add(OfxCellFactory.createParagraphCell("URL")); row.getCell().add(OfxCellFactory.createParagraphCell("Schedule")); row.getCell().add(OfxCellFactory.createParagraphCell("Frequency")); Head head = new Head(); head.getRow().add(row); return head; }
private Specification createSpecifications() { int flexWidth=0;int w=0; Columns cols = new Columns(); w=20;flexWidth=flexWidth+w;cols.getColumn().add(OfxColumnFactory.flex(w,true)); w=20;flexWidth=flexWidth+w;cols.getColumn().add(OfxColumnFactory.flex(w,true)); cols.getColumn().add(OfxColumnFactory.flex()); Specification specification = new Specification(); specification.setColumns(cols); return specification; }
public static Cell build(){return new Cell();}