This is an automated email from the git hooks/post-receive script. New commit to branch feature/7854 in repository tutti. See http://git.codelutin.com/tutti.git commit d53f38b007656d51b3af0cdf372e450e5b9db01e Author: Kevin Morin <morin@codelutin.com> Date: Tue Dec 22 09:52:37 2015 +0100 recuperation de la colonne des especes par son identifier plutot que par l'index, qui varie en fonction des colonnes cachées (fixes #7854) --- .../swing/content/operation/catches/SpeciesAbleBatchRowHelper.java | 4 ---- .../content/operation/catches/benthos/BenthosBatchUIHandler.java | 6 +++--- .../content/operation/catches/species/SpeciesBatchUIHandler.java | 6 +++--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/SpeciesAbleBatchRowHelper.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/SpeciesAbleBatchRowHelper.java index fc641e8..2247901 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/SpeciesAbleBatchRowHelper.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/SpeciesAbleBatchRowHelper.java @@ -213,10 +213,6 @@ public class SpeciesAbleBatchRowHelper { } } - public static TableColumnExt getSpeciesColumn(JXTable table) { - return (TableColumnExt) table.getColumns().get(2); - } - /** * Calcule le poids total des mensurations. * diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java index 2b20bb8..bf184c0 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java @@ -832,7 +832,7 @@ public class BenthosBatchUIHandler extends AbstractTuttiBatchTableUIHandler<Bent table.getTableHeader().setReorderingAllowed(false); // get species column - final TableColumnExt speciesColumn = SpeciesAbleBatchRowHelper.getSpeciesColumn(table); + final TableColumnExt speciesColumn = table.getColumnExt(BenthosBatchTableModel.SPECIES); // when model change, then rebuild the species comparator + set model as modified tableModel.addTableModelListener(new TableModelListener() { @@ -1401,7 +1401,7 @@ public class BenthosBatchUIHandler extends AbstractTuttiBatchTableUIHandler<Bent } protected SpeciesBatchDecoratorComparator<BenthosBatchRowModel> getSpeciesRowComparator() { - TableColumnExt speciesColumn = SpeciesAbleBatchRowHelper.getSpeciesColumn(getTable()); + TableColumnExt speciesColumn = getTable().getColumnExt(BenthosBatchTableModel.SPECIES); SpeciesBatchDecoratorComparator<BenthosBatchRowModel> comparator = (SpeciesBatchDecoratorComparator<BenthosBatchRowModel>) speciesColumn.getComparator(); @@ -1424,7 +1424,7 @@ public class BenthosBatchUIHandler extends AbstractTuttiBatchTableUIHandler<Bent } protected SpeciesBatchDecorator<BenthosBatchRowModel> getSpeciesColumnDecorator() { - TableColumnExt speciesColumn = SpeciesAbleBatchRowHelper.getSpeciesColumn(getTable()); + TableColumnExt speciesColumn = getTable().getColumnExt(BenthosBatchTableModel.SPECIES); SpeciesBatchDecorator<BenthosBatchRowModel> decorator = (SpeciesBatchDecorator<BenthosBatchRowModel>) SpeciesAbleBatchRowHelper.getSpeciesColumnDecorator(speciesColumn); return decorator; diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java index 43cb3f0..1405cd3 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java @@ -836,7 +836,7 @@ public class SpeciesBatchUIHandler extends AbstractTuttiBatchTableUIHandler<Spec table.getTableHeader().setReorderingAllowed(false); // get the species column - final TableColumnExt speciesColumn = SpeciesAbleBatchRowHelper.getSpeciesColumn(table); + final TableColumnExt speciesColumn = table.getColumnExt(SpeciesBatchTableModel.SPECIES); // when model change, then rebuild the species comparator + set model as modified @@ -1412,7 +1412,7 @@ public class SpeciesBatchUIHandler extends AbstractTuttiBatchTableUIHandler<Spec } protected SpeciesBatchDecoratorComparator<SpeciesBatchRowModel> getSpeciesRowComparator() { - TableColumnExt speciesColumn = SpeciesAbleBatchRowHelper.getSpeciesColumn(getTable()); + TableColumnExt speciesColumn = getTable().getColumnExt(SpeciesBatchTableModel.SPECIES); SpeciesBatchDecoratorComparator<SpeciesBatchRowModel> comparator = (SpeciesBatchDecoratorComparator<SpeciesBatchRowModel>) speciesColumn.getComparator(); @@ -1435,7 +1435,7 @@ public class SpeciesBatchUIHandler extends AbstractTuttiBatchTableUIHandler<Spec } protected SpeciesBatchDecorator<SpeciesBatchRowModel> getSpeciesColumnDecorator() { - TableColumnExt speciesColumn = SpeciesAbleBatchRowHelper.getSpeciesColumn(getTable()); + TableColumnExt speciesColumn = getTable().getColumnExt(SpeciesBatchTableModel.SPECIES); SpeciesBatchDecorator<SpeciesBatchRowModel> decorator = (SpeciesBatchDecorator<SpeciesBatchRowModel>) SpeciesAbleBatchRowHelper.getSpeciesColumnDecorator(speciesColumn); return decorator; -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.