Interface ChangeBufferTableModel<T>
-
- All Superinterfaces:
BeanTableModel<T>
,ChangeBuffer
,ColumnIdentifier
,javax.swing.table.TableModel
- All Known Implementing Classes:
BufferedBeanListTableModel
,BufferedHeaderDetailTableModel
,ValidatedBeanListTableModel
public interface ChangeBufferTableModel<T> extends BeanTableModel<T>, ColumnIdentifier, ChangeBuffer
A table model that stores changes until committed or reverted.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.stream.Stream<T>
getChangedRows()
java.util.List<T>
getPendingAdds()
java.util.List<T>
getPendingDeletes()
java.util.stream.Stream<T>
getPendingUpdates()
boolean
isChangedAt(int rowIndex, int columnIndex)
boolean
isPendingDelete(int rowIndex)
void
queueAdd(int index, T bean)
Insert an unsaved bean.void
queueAdd(T bean)
Append an unsaved bean.boolean
queueDelete(T bean)
void
undoChangedAt(int rowIndex, int columnIndex)
void
undoDelete(int rowIndex)
-
Methods inherited from interface io.github.jonestimd.swing.table.model.BeanTableModel
getBean, getBeanCount, getCursor, getValue, handleClick, setBeans, updateBeans
-
Methods inherited from interface io.github.jonestimd.swing.ChangeBuffer
commit, isChanged, revert
-
Methods inherited from interface io.github.jonestimd.swing.table.model.ColumnIdentifier
getColumnIdentifier
-
-
-
-
Method Detail
-
queueAdd
void queueAdd(T bean)
Append an unsaved bean.
-
queueAdd
void queueAdd(int index, T bean)
Insert an unsaved bean.
-
queueDelete
boolean queueDelete(T bean)
- Returns:
- true if the delete was queued, false if the row was an unsaved addition and was deleted immediately.
-
getChangedRows
java.util.stream.Stream<T> getChangedRows()
- Returns:
- updated, added and deleted rows.
-
getPendingAdds
java.util.List<T> getPendingAdds()
-
getPendingDeletes
java.util.List<T> getPendingDeletes()
-
getPendingUpdates
java.util.stream.Stream<T> getPendingUpdates()
- Returns:
- added and changed rows.
-
isChangedAt
boolean isChangedAt(int rowIndex, int columnIndex)
-
undoChangedAt
void undoChangedAt(int rowIndex, int columnIndex)
-
isPendingDelete
boolean isPendingDelete(int rowIndex)
-
undoDelete
void undoDelete(int rowIndex)
-
-