001 package org.hackystat.projectbrowser.page.dailyprojectdata.coupling; 002 003 import java.util.List; 004 005 import org.apache.wicket.markup.html.basic.Label; 006 import org.apache.wicket.markup.html.list.ListItem; 007 import org.apache.wicket.markup.html.list.ListView; 008 import org.apache.wicket.markup.html.panel.Panel; 009 010 import org.hackystat.dailyprojectdata.resource.coupling.jaxb.CouplingData; 011 012 /** 013 * Panel showing the drilldown of build data. 014 * @author Philip Johnson 015 */ 016 public class CouplingDetailsPanel extends Panel { 017 018 /** Support serialization. */ 019 private static final long serialVersionUID = 1L; 020 021 /** 022 * @param id the wicket component id. 023 * @param dataList the List of CouplingData. 024 */ 025 public CouplingDetailsPanel(String id, List<CouplingData> dataList) { 026 super(id); 027 028 ListView buildListView = new ListView("couplingDetails", dataList) { 029 030 /** Support serialization. */ 031 private static final long serialVersionUID = 1L; 032 033 @Override 034 protected void populateItem(ListItem item) { 035 CouplingData data = (CouplingData) item.getModelObject(); 036 item.add(new Label("file", data.getUri())); 037 item.add(new Label("afferent", String.valueOf(data.getAfferent()))); 038 item.add(new Label("efferent", String.valueOf(data.getEfferent()))); 039 } 040 }; 041 add(buildListView); 042 } 043 044 }