1 7 package org.jdesktop.swing.data; 8 9 import junit.framework.TestCase; 10 11 17 public class DefaultTableModelExtIssues extends TestCase { 18 19 24 public void testSetValueContract() { 25 DefaultTableModelExt model = new DefaultTableModelExt(1); 26 MetaData metaData = new MetaData("one"); 27 metaData.setReadOnly(true); 28 model.setColumnMetaData(0, metaData); 29 model.addRow(new Object [] {"non-editable value"}); 30 assertFalse("cell must be uneditable", model.isCellEditable(0, 0)); 31 try { 32 model.setValueAt("changed", 0, 0); 33 } catch (RuntimeException ex) { 34 fail("must not introduce precondition"); 35 } 36 } 37 } 38 | Popular Tags |