1 7 package org.jdesktop.swing.data; 8 9 import org.jdesktop.dataset.DataSet; 10 import org.jdesktop.dataset.DataTable; 11 import org.jdesktop.dataset.adapter.TabularDataModelAdapter; 12 import org.jdesktop.swing.util.DataSetTestSupport; 13 14 19 public class DMToTableModelAdapterMetaDataProviderTest extends 20 AbstractMetaDataProviderTst { 21 22 protected MetaDataProvider createFilledMetaDataProvider() { 23 DataSet dataSet = DataSetTestSupport.createDefaultDataSet(3); 24 DataSetTestSupport.fillDefaultTable(dataSet); 25 DataTable table = dataSet.getTable(DataSetTestSupport.ADAPTEE_TABLE_NAME); 26 TabularDataModel model = new TabularDataModelAdapter(table); 27 return new DataModelToTableModelAdapter(model); 28 } 29 30 protected MetaDataProvider createEmptyMetaDataProvider() { 31 DataTable table = DataSetTestSupport.createDataSet(new MetaData[] { }, 0).getTable(DataSetTestSupport.ADAPTEE_TABLE_NAME); 32 TabularDataModel model = new TabularDataModelAdapter(table); 33 return new DataModelToTableModelAdapter(model); 34 } 35 36 } 37 | Popular Tags |