Package com.googlecode.g2re.html

Examples of com.googlecode.g2re.html.GridCell


        GridRow row2 = new GridRow();
        GridRow row3 = new GridRow();
        GridRow row4 = new GridRow();
        grid.addRows(row1,row2,row3,row4);
       
        row1.addCell(new GridCell(new RawHTML("<h2>Top 5 Pets</h2>")));
        row1.addCell(new GridCell(new RawHTML("<h2>Vote Summary</h2>")));
       
        row3.addCell(new GridCell(new RawHTML("<h2>Pet Locations</h2>")));
        row3.addCell(new GridCell(new RawHTML("<h2>Score Summary</h2>")));
       

       
       
       
       
       
       
        /* create data table, set the data query */
        DataTable table = new DataTable();
        table.setCellPadding(1);
        table.setDataQuery(queryB);
        queryB.getFilters().add(new TopNFilter(5, col5b));
       
        /* create table header rows */
        GridRow tableHeader = new GridRow();
        tableHeader.addCell(new com.googlecode.g2re.html.GridCell(new RawHTML("Name")));
        tableHeader.addCell(new com.googlecode.g2re.html.GridCell(new RawHTML("Description")));
        tableHeader.addCell(new com.googlecode.g2re.html.GridCell(new RawHTML("Price")));
        table.getHeaderRows().add(tableHeader);

        /* create table body rows */
        GridRow tableBody = new GridRow();
        tableBody.addCell(new com.googlecode.g2re.html.GridCell(new DataElement(col1b, 0)));
        tableBody.addCell(new com.googlecode.g2re.html.GridCell(new DataElement(col2b, 1)));
        /* add formatted price column */
        DataElement priceCellElement = new DataElement(col3b, 2);
        priceCellElement.setNumberFormat("$###,###,###,##0.00");
        tableBody.addCell(new com.googlecode.g2re.html.GridCell(priceCellElement));
       
        /* add rows to table */
        table.getBodyRows().add(tableBody);

        /* add the table to the report */
        row2.addCell(new GridCell(table));
        //report.getWebPage().addChildElement(table);
       
       
       
        PieChart pie = new PieChart();
        pie.setDataQuery(queryA);
        //pie.setHeight(250);
        //pie.setWidth(300);
        pie.setThreeDimensional(true);
        pie.setValueColumn(col3a);
        pie.setNameColumn(col1a);
        pie.setTitle("Vote Summary");
        row2.addCell(new GridCell(pie));
       
       
        /* create and add a map */
        Map m = new Map();
        m.setDataQuery(queryB);
        m.setMapType(MapType.normal);
        m.setShowTip(true);
        m.setName("Pet Map");
        m.setDescriptionColumn(col2b);
        m.setAddressColumn(col4b);       
       
        row4.addCell(new GridCell(m));
       
       
        BarChart bar = new BarChart();
        bar.setThreeDimensional(true);
        bar.setTitle("Score Summary");
        bar.setDataQuery(queryA);
        bar.setFlipAxis(true);
        bar.setLegendLocation(LegendLocation.none);
        bar.setValueSeriesColumn(col2a);
        bar.setCategorySeriesColumn(col1a);
        row4.addCell(new GridCell(bar));
       
        return report;
    }
View Full Code Here

TOP

Related Classes of com.googlecode.g2re.html.GridCell

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.