KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jdesktop > swing > data > TableModelExtAdapterMetaDataProviderTest


1 /*
2  * $Id: TableModelExtAdapterMetaDataProviderTest.java,v 1.1 2005/01/27 14:40:28 kleopatra Exp $
3  *
4  * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
5  * Santa Clara, California 95054, U.S.A. All rights reserved.
6  */

7 package org.jdesktop.swing.data;
8
9 /**
10  * testing the MetaDataProvider aspect of TableModelExtAdapter.
11  *
12  * @author Jeanette Winzenburg
13  */

14 public class TableModelExtAdapterMetaDataProviderTest extends
15         AbstractMetaDataProviderTst {
16
17     protected MetaDataProvider createFilledMetaDataProvider() {
18         DefaultTableModelExt model = new DefaultTableModelExt(defaultMetaData.length);
19         for (int i = 0; i < defaultMetaData.length; i++) {
20             model.setColumnMetaData(i, defaultMetaData[i]);
21         }
22         TableModelExtAdapter adapter = new TableModelExtAdapter(model);
23         return adapter;
24     }
25
26     protected MetaDataProvider createEmptyMetaDataProvider() {
27         return new TableModelExtAdapter(new DefaultTableModelExt());
28     }
29
30 }
31
Popular Tags