KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * $Id: DefaultTableModelExtMetaDataProviderTest.java,v 1.1 2005/01/27 14:20:41 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 DefaultTableModelExt.
11  *
12  * @author Jeanette Winzenburg
13  */

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