Author: kmorin Date: 2013-03-04 17:57:44 +0100 (Mon, 04 Mar 2013) New Revision: 529 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/529 Log: - do not hide screen when computing weights - select last create batch in species catches - reset simple count when leaving frequency screen - reset the selected category when leaving the split screen, otherwise, the selected data are not reset - clear the rows before creating the new rows in setRows Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SpeciesFrequencyUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableModel.java Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java 2013-03-04 16:44:45 UTC (rev 528) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java 2013-03-04 16:57:44 UTC (rev 529) @@ -11,15 +11,15 @@ * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public + * + * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% @@ -60,7 +60,7 @@ "generate", _("tutti.action.computeWeights"), _("tutti.action.computeWeights.tip"), - true); + false); } @Override @@ -176,10 +176,10 @@ errorComponent = ui.getSpeciesTotalSortedWeightField(); } else if (speciesTotalSortedWeight < 1.05 * totalSortedWeight) { - // TODO Si le "Poids total VRAC" est saisi est que sa valeur - // est supérieure de moins de x% (x en configuration) - // du "Poids total Vrac trié", demander confirmation que - // le "Poids total VRAC" est bien une valeur observée + // TODO Si le "Poids total VRAC" est saisi est que sa valeur + // est supérieure de moins de x% (x en configuration) + // du "Poids total Vrac trié", demander confirmation que + // le "Poids total VRAC" est bien une valeur observée // sinon la remplacer par le "Poids total Vrac trié" } @@ -262,7 +262,7 @@ errorComponent = null; } else if (categoryWeight == null && frequencyWeight != null) { - // if the category weight is null and the frequencies have a weight, + // if the category weight is null and the frequencies have a weight, // then this weight is the result finestCategory.setComputedWeight(frequencyWeight); result = frequencyWeight; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-03-04 16:44:45 UTC (rev 528) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-03-04 16:57:44 UTC (rev 529) @@ -10,15 +10,15 @@ * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public + * + * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% @@ -59,6 +59,7 @@ import fr.ifremer.tutti.ui.swing.util.editor.AttachmentCellComponent; import fr.ifremer.tutti.ui.swing.util.editor.LongTextCellComponent; import fr.ifremer.tutti.ui.swing.util.editor.TuttiComputedOrNotDataTableCell; +import fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction; import fr.ifremer.tutti.ui.swing.util.table.ColumnIdentifier; import jaxx.runtime.JAXXUtil; import jaxx.runtime.SwingUtil; @@ -735,6 +736,7 @@ recomputeRowValidState(newRow); tableModel.addNewRow(newRow); + AbstractSelectTableAction.doSelectCell(getTable(), tableModel.getRowCount() - 1, 0); saveRow(newRow); Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SpeciesFrequencyUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SpeciesFrequencyUIHandler.java 2013-03-04 16:44:45 UTC (rev 528) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SpeciesFrequencyUIHandler.java 2013-03-04 16:57:44 UTC (rev 529) @@ -10,15 +10,15 @@ * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public + * + * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% @@ -295,6 +295,8 @@ // when canceling always invalid model (in that way) getModel().setValid(false); + getModel().setSimpleCount(null); + EditCatchesUI parent = SwingUtil.getParentContainer(ui, EditCatchesUI.class); parent.getHandler().setSpeciesSelectedCard(EditCatchesUIHandler.MAIN_CARD); } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIHandler.java 2013-03-04 16:44:45 UTC (rev 528) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIHandler.java 2013-03-04 16:57:44 UTC (rev 529) @@ -10,15 +10,15 @@ * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public + * + * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% @@ -216,6 +216,7 @@ // when canceling always invalid model getModel().setValid(false); + getModel().setSelectedCategory(null); EditCatchesUI parent = SwingUtil.getParentContainer(ui, EditCatchesUI.class); parent.getHandler().setSpeciesSelectedCard(EditCatchesUIHandler.MAIN_CARD); Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableModel.java 2013-03-04 16:44:45 UTC (rev 528) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableModel.java 2013-03-04 16:57:44 UTC (rev 529) @@ -10,15 +10,15 @@ * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public + * + * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% @@ -145,6 +145,7 @@ // can't accept a empty data list Preconditions.checkNotNull(data, "Data list can not be null."); + this.rows = null; if (createEmptyRowIsEmpty && data.isEmpty()) { if (log.isInfoEnabled()) {
participants (1)
-
kmorin@users.forge.codelutin.com