1 package net.sf.statcvs.pages; 2 3 import net.sf.statcvs.charts.ChartImage; 4 import net.sf.statcvs.charts.LOCChartMaker.MainLOCChartMaker; 5 import net.sf.statcvs.output.ReportConfig; 6 7 public class LOCPageMaker { 8 private final ReportConfig config; 9 10 public LOCPageMaker(final ReportConfig config) { 11 this.config = config; 12 } 13 14 public NavigationNode toFile() { 15 final ChartImage chart = new MainLOCChartMaker(this.config, "loc.png", this.config.getLargeChartSize()).toFile(); 16 17 final Page result = config.createPage("loc", "Lines of Code", "Lines of Code"); 18 result.addAttribute("Total Lines of Code", this.config.getRepository().getCurrentLOC()); 19 result.addAttribute("Most Recent Commit", this.config.getRepository().getLastDate()); 20 result.add(chart); 21 return result; 22 } 23 }