Package org.gridkit.util.formating

Examples of org.gridkit.util.formating.TextTable


            }
        }
    }
   
    public String formatHisto() {
        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);
    }
View Full Code Here


        }
        return tt.formatTextTableUnbordered(200);
    }

    public String formatHisto(int limit) {
        TextTable tt = new TextTable();
        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

Related Classes of org.gridkit.util.formating.TextTable

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.