/** * {@inheritDoc} */ @Override public final void fireTableDataChanged() { tableModelEvent.setAllDataChanged(); tableModel.fireTableChanged(tableModelEvent); }
/** * Ensures that only one TableModelEvent is created and fired for the given ListEvent. */ private void fireOneTableModelEvent(ListEvent<E> listChanges) { // build an "optimized" TableModelEvent describing the precise range of rows in the first block listChanges.nextBlock(); final int startIndex = listChanges.getBlockStartIndex(); final int endIndex = listChanges.getBlockEndIndex(); final int changeType = listChanges.getType(); getMutableTableModelEvent().setValues(startIndex, endIndex, changeType); // if another block exists, fallback to using a generic "data changed" TableModelEvent if (listChanges.nextBlock()) getMutableTableModelEvent().setAllDataChanged(); // fire the single TableModelEvent representing the entire ListEvent fireTableChanged(getMutableTableModelEvent()); } }
/** * Ensures that only one TableModelEvent is created and fired for the given ListEvent. */ private void fireOneTableModelEvent(ListEvent<E> listChanges) { // build an "optimized" TableModelEvent describing the precise range of rows in the first block listChanges.nextBlock(); final int startIndex = listChanges.getBlockStartIndex(); final int endIndex = listChanges.getBlockEndIndex(); final int changeType = listChanges.getType(); getMutableTableModelEvent().setValues(startIndex, endIndex, changeType); // if another block exists, fallback to using a generic "data changed" TableModelEvent if (listChanges.nextBlock()) getMutableTableModelEvent().setAllDataChanged(); // fire the single TableModelEvent representing the entire ListEvent fireTableChanged(getMutableTableModelEvent()); } }