Package org.gridkit.util.formating

Examples of org.gridkit.util.formating.TextTable.addRow()


        TextTable tt = new TextTable();
        List<SiteInfo> h = new ArrayList<SiteInfo>(histo.values());
        Collections.sort(h, BY_OCCURENCE);
        for(SiteInfo si: h) {
            int pc = (100 * si.getOccurences()) / traceCount;
            tt.addRow("" + si.getOccurences(), " " + pc + "%", " " + si.getHitCount(), " " + si.getSite());
        }
        return tt.formatTextTableUnbordered(200);
    }

    public String formatHisto(int limit) {
View Full Code Here


        List<SiteInfo> h = new ArrayList<SiteInfo>(histo.values());
        Collections.sort(h, BY_OCCURENCE);
        int n = 0;
        for(SiteInfo si: h) {           
            int pc = (100 * si.getOccurences()) / traceCount;
            tt.addRow("" + si.getOccurences(), " " + pc + "%", " " + si.getHitCount(), " " + si.getSite());
            if (limit <= ++n) {
                break;
            }
        }
        return tt.formatTextTableUnbordered(200);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.