not editable tables

cusax-fix
Yana Stamcheva 20 years ago
parent 8c62385755
commit 042c3bb474

@ -25,4 +25,12 @@ public class BooleanToCheckTableModel extends DefaultTableModel {
public Class getColumnClass(int c) {
return getValueAt(0, c).getClass();
}
public boolean isCellEditable(int row, int col)
{
if(col < 1)
return true;
else
return false;
}
}

@ -16,14 +16,15 @@
*
* @author Yana Stamcheva
*/
public class ExtendedTableModel extends DefaultTableModel {
public class ExtendedTableModel extends DefaultTableModel
{
/**
* Returns the index of the row, in which the given value is contained.
* @param value the value to search for
* @return the index of the row, in which the given value is contained.
*/
public int rowIndexOf(Object value) {
public int rowIndexOf(Object value)
{
Vector dataVector = this.getDataVector();
for(int i = 0; i < dataVector.size(); i ++) {
@ -35,4 +36,10 @@ public int rowIndexOf(Object value) {
}
return -1;
}
public boolean isCellEditable(int row, int col)
{
return false;
}
}

Loading…
Cancel
Save