public void tableChanged(TableModelEvent e)
{
	boolean dirty = !isSorted();		// Dirty bit to see if we should resort

	if (!dirty) {
		if (e.getType() == TableModelEvent.UPDATE) {
			if (e.getFirstRow() == TableModelEvent.HEADER_ROW) {
				// Table structure changed. Not supported for now!
				throw new UnsupportedOperationException(
					"SortedJTypeTableModel cannot handle table structure changes!!!");
			}

			int col = e.getColumn();
			if (col == TableModelEvent.ALL_COLUMNS) {
				// One of our columns is sorted
				dirty = true;
			} else if (e.getFirstRow() != e.getLastRow()) {
				// See if there's more than one row.
				// We could fire individual events for each row changed, but
				// we'll just be lazy and mark the dirty bit.
				dirty = true;
			} else {
				// See if we're changing any sorted columns
				if (spec.getSortDir(col) != 0) dirty = true;
//				for (SortCol sc : spec.getSortCols()) {
//					if (sc.col == col) {
//						dirty = true;
//						break;
//					}
//				}
			}
		} else {
			// It's INSERT or DELETE --- set dirty bit!
			dirty = true;
		}
	}

	if (dirty) {
		setSorted();
		fireTableChanged(new TableModelEvent(this));
	} else {
		// Re-work old event
		fireTableChanged(new TableModelEvent(this,
			modelToView[e.getFirstRow()],
			modelToView[e.getLastRow()],
			e.getColumn(), e.getType()));
	}
}