View Javadoc
1 /* 2 * Angkor Web Framework 3 * 4 * Distributable under LGPL license. 5 * See terms of license at gnu.org. 6 */ 7 8 package com.tirsen.angkor.beans; 9 10 import java.util.List; 11 12 /*** 13 * <!-- $Id: PropertyTableModel.java,v 1.2 2002/10/09 21:37:37 tirsen Exp $ --> 14 * <!-- $Author: tirsen $ --> 15 * 16 * @author Jon Tirs´n (tirsen@users.sourceforge.net) 17 * @version $Revision: 1.2 $ 18 */ 19 class PropertyTableModel extends BeanTableModel 20 { 21 private PropertySupport property; 22 23 public PropertyTableModel(BeanModel model, String property, Class propertyClass) 24 { 25 this.property = new PropertySupport(model, property, propertyClass); 26 } 27 28 public List getRows() 29 { 30 return property.getList(); 31 } 32 33 protected Class getRowClass() 34 { 35 return property.getComponentType(); 36 } 37 38 public int getRowCount() 39 { 40 int rowCount = super.getRowCount(); 41 if (rowCount == -1) 42 { 43 rowCount = property.size(); 44 } 45 return rowCount; 46 } 47 }

This page was automatically generated by Maven