branch develop updated (480eb9b -> 869e21f)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository jaxx. See http://git.nuiton.org/jaxx.git from 480eb9b fixes #3605: NumberEditor model does not fire when bean is changed. new 869e21f fixes #3606: Add more hooks on ApplicationTableModel The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 869e21fa3c28a6f9c248bea33bd1f7cb00cbc9f8 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Jan 1 14:52:06 2015 +0100 fixes #3606: Add more hooks on ApplicationTableModel Summary of changes: .../swing/table/AbstractApplicationTableModel.java | 24 ++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jaxx. See http://git.nuiton.org/jaxx.git commit 869e21fa3c28a6f9c248bea33bd1f7cb00cbc9f8 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Jan 1 14:52:06 2015 +0100 fixes #3606: Add more hooks on ApplicationTableModel --- .../swing/table/AbstractApplicationTableModel.java | 24 ++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/jaxx-application-swing/src/main/java/org/nuiton/jaxx/application/swing/table/AbstractApplicationTableModel.java b/jaxx-application-swing/src/main/java/org/nuiton/jaxx/application/swing/table/AbstractApplicationTableModel.java index e1e82b4..1021bcb 100644 --- a/jaxx-application-swing/src/main/java/org/nuiton/jaxx/application/swing/table/AbstractApplicationTableModel.java +++ b/jaxx-application-swing/src/main/java/org/nuiton/jaxx/application/swing/table/AbstractApplicationTableModel.java @@ -112,6 +112,8 @@ public abstract class AbstractApplicationTableModel<R extends Serializable> exte // can't accept a empty data list Preconditions.checkNotNull(data, "Data list can not be null."); + onBeforeRowsChanged(rows); + this.rows = null; if (createEmptyRowIsEmpty && data.isEmpty()) { @@ -176,6 +178,7 @@ public abstract class AbstractApplicationTableModel<R extends Serializable> exte int rowIndex = data.indexOf(row); + onRowUpdated(rowIndex, row); fireTableRowsUpdated(rowIndex, rowIndex); return rowIndex; } @@ -185,17 +188,30 @@ public abstract class AbstractApplicationTableModel<R extends Serializable> exte List<R> data = getRows(); - R result = data.remove(rowIndex); + R row = data.remove(rowIndex); + onRowRemoved(rowIndex, row); fireTableRowsDeleted(rowIndex, rowIndex); - return result; + return row; + } + + protected void onRowsChanged(List<R> newRows) { + // by default do nothing + } + + protected void onBeforeRowsChanged(List<R> oldRows) { + // by default do nothing + } + + protected void onRowAdded(int rowIndex, R row) { + // by default do nothing } - protected void onRowsChanged(List<R> data) { + protected void onRowUpdated(int rowIndex, R row) { // by default do nothing } - protected void onRowAdded(int rowIndex, R newValue) { + protected void onRowRemoved(int rowIndex, R row) { // by default do nothing } -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm