package data.swing; import data.*; import util.swing.*; /** * A {@link TableEntryDescriptor} that can be used with a {@link StoringStockTableModel}. * * <p>There will be exactly one column headed "Name" and displaying the items' names.</p> * * @author Steffen Zschaler * @version 2.0 23/08/1999 * @since v2.0 */ public class DefaultStockItemTED extends AbstractTableEntryDescriptor { /** * @return 1. * @override Sometimes */ public int getColumnCount() { return 1; } /** * @return "Name". * @override Sometimes */ public String getColumnName (int nIdx) { return "Name"; } /** * @return <code>String.class</code>. * @override Sometimes */ public Class getColumnClass (int nIdx) { return String.class; } /** * @return the name of the StockItem. * @override Sometimes */ public Object getValueAt (Object oData, int nIdx) { return ((StockItem) oData).getName(); } }