Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
36e4a668
by Tony Chemit at 2024-12-11T17:56:46+01:00
-
93f16ff2
by Tony Chemit at 2024-12-11T18:01:50+01:00
5 changed files:
- client/datasource/editor/ps/src/main/i18n/getters/java.getter
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/SampleUI.jaxx
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/SampleUIHandler.java
- + client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/actions/SampleUIResetWeights.java
- client/runner/src/main/i18n/translations/client-runner_fr_FR.properties
Changes:
| 1 | +bean.action.reset.tip
|
|
| 1 | 2 | boolean.true
|
| 2 | 3 | observe.Common.action.move.down.tip
|
| 3 | 4 | observe.Common.action.move.up.tip
|
| ... | ... | @@ -114,6 +114,9 @@ |
| 114 | 114 | <cell anchor='west'>
|
| 115 | 115 | <JLabel id='smallsWeightLabel'/>
|
| 116 | 116 | </cell>
|
| 117 | + <cell>
|
|
| 118 | + <JPanel/>
|
|
| 119 | + </cell>
|
|
| 117 | 120 | <cell anchor='east' weightx="1" fill="both">
|
| 118 | 121 | <NumberEditor id='smallsWeight' styleClass="float2"/>
|
| 119 | 122 | </cell>
|
| ... | ... | @@ -126,6 +129,11 @@ |
| 126 | 129 | <cell anchor='west'>
|
| 127 | 130 | <JLabel id='bigsWeightLabel'/>
|
| 128 | 131 | </cell>
|
| 132 | + <cell>
|
|
| 133 | + <JToolBar>
|
|
| 134 | + <JButton id='resetWeights'/>
|
|
| 135 | + </JToolBar>
|
|
| 136 | + </cell>
|
|
| 129 | 137 | <cell anchor='east' weightx="1" fill="both">
|
| 130 | 138 | <NumberEditor id='bigsWeight' styleClass="float2"/>
|
| 131 | 139 | </cell>
|
| ... | ... | @@ -140,6 +148,9 @@ |
| 140 | 148 | <cell anchor='west'>
|
| 141 | 149 | <JLabel id='totalWeightLabel'/>
|
| 142 | 150 | </cell>
|
| 151 | + <cell>
|
|
| 152 | + <JPanel/>
|
|
| 153 | + </cell>
|
|
| 143 | 154 | <cell anchor='east' weightx="1" fill="both">
|
| 144 | 155 | <NumberEditor id='totalWeight' styleClass="float2"/>
|
| 145 | 156 | </cell>
|
| ... | ... | @@ -58,6 +58,9 @@ public class SampleUIHandler extends GeneratedSampleUIHandler { |
| 58 | 58 | public void onInit(SampleUI ui) {
|
| 59 | 59 | super.onInit(ui);
|
| 60 | 60 | ui.getSampleActivityTableModel().init(ui);
|
| 61 | + ui.getTotalWeight().setShowReset(false);
|
|
| 62 | + ui.getSmallsWeight().setShowReset(false);
|
|
| 63 | + ui.getBigsWeight().setShowReset(false);
|
|
| 61 | 64 | }
|
| 62 | 65 | |
| 63 | 66 | @Override
|
| 1 | +package fr.ird.observe.client.datasource.editor.ps.data.logbook.actions;
|
|
| 2 | + |
|
| 3 | +/*-
|
|
| 4 | + * #%L
|
|
| 5 | + * ObServe Client :: DataSource :: Editor :: PS
|
|
| 6 | + * %%
|
|
| 7 | + * Copyright (C) 2008 - 2024 IRD, Ultreia.io
|
|
| 8 | + * %%
|
|
| 9 | + * This program is free software: you can redistribute it and/or modify
|
|
| 10 | + * it under the terms of the GNU General Public License as
|
|
| 11 | + * published by the Free Software Foundation, either version 3 of the
|
|
| 12 | + * License, or (at your option) any later version.
|
|
| 13 | + *
|
|
| 14 | + * This program is distributed in the hope that it will be useful,
|
|
| 15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 17 | + * GNU General Public License for more details.
|
|
| 18 | + *
|
|
| 19 | + * You should have received a copy of the GNU General Public
|
|
| 20 | + * License along with this program. If not, see
|
|
| 21 | + * <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 22 | + * #L%
|
|
| 23 | + */
|
|
| 24 | + |
|
| 25 | +import fr.ird.observe.client.datasource.editor.api.content.data.open.actions.ContentOpenableUIActionSupport;
|
|
| 26 | +import fr.ird.observe.client.datasource.editor.ps.data.logbook.SampleUI;
|
|
| 27 | +import fr.ird.observe.client.util.UIHelper;
|
|
| 28 | +import fr.ird.observe.dto.data.ps.logbook.SampleDto;
|
|
| 29 | + |
|
| 30 | +import java.awt.event.ActionEvent;
|
|
| 31 | + |
|
| 32 | +import static io.ultreia.java4all.i18n.I18n.n;
|
|
| 33 | + |
|
| 34 | +/**
|
|
| 35 | + * To reset the three weights values on {@link SampleDto}.
|
|
| 36 | + * <p>
|
|
| 37 | + * Created at 11/12/2024.
|
|
| 38 | + *
|
|
| 39 | + * @author Tony Chemit - dev@tchemit.fr
|
|
| 40 | + * @since 9.4.0
|
|
| 41 | + * @see <a href="https://gitlab.com/ultreiaio/ird-observe/-/issues/2957">issue 2957</a>
|
|
| 42 | + */
|
|
| 43 | +public class SampleUIResetWeights extends ContentOpenableUIActionSupport<SampleDto, SampleUI> {
|
|
| 44 | + |
|
| 45 | + public SampleUIResetWeights() {
|
|
| 46 | + super(SampleDto.class, null, n("bean.action.reset.tip"), "combobox-reset", null);
|
|
| 47 | + }
|
|
| 48 | + |
|
| 49 | + @Override
|
|
| 50 | + protected final void doActionPerformed(ActionEvent e, SampleUI ui) {
|
|
| 51 | + ui.getModel().getStates().getBean().setTotalWeight(null);
|
|
| 52 | + ui.getModel().getStates().getBean().setSmallsWeight(null);
|
|
| 53 | + ui.getModel().getStates().getBean().setBigsWeight(null);
|
|
| 54 | + }
|
|
| 55 | +} |
| ... | ... | @@ -39,8 +39,8 @@ observe.config.client.logFiles.timeout.description=Nettoyage des fichiers de log |
| 39 | 39 | observe.config.client.temporaryFiles.timeout.description=Nettoyage des fichiers temporaires (en heures)
|
| 40 | 40 | observe.config.consolidation.failIfLengthLengthParameterNotFound=Dans l'action de consolidation, déclencher une erreur si une relation taille-taille n'est pas trouvée, sinon consigner cela en avertissement de l'action
|
| 41 | 41 | observe.config.consolidation.failIfLengthWeightParameterNotFound=Dans l'action de consolidation, déclencher une erreur si une relation taille-poids n'est pas trouvée, sinon consigner cela en avertissement de l'action
|
| 42 | -observe.config.consolidation.speciesListForLogbookSampleActivityWeightedWeight=Liste des espèces à utiliser dans l'action de consolidation du champs Poids pondéré des échantillons calée (Senne / Livre de bord)
|
|
| 43 | -observe.config.consolidation.speciesListForLogbookSampleWeights=Liste des espèces à utiliser dans l'action de consolidation des champs Poids des échantillons (Senne / Livre de bord)
|
|
| 42 | +observe.config.consolidation.speciesListForLogbookSampleActivityWeightedWeight=Liste des espèces pour le calcul des poids pondérés des échantillons calée (Senne / Livre de bord)
|
|
| 43 | +observe.config.consolidation.speciesListForLogbookSampleWeights=Liste des espèces pour la sommation des poids des cuves échantillonnées (Senne / Livre de bord)
|
|
| 44 | 44 | observe.config.coordinate.format=Format des positions (DMD, DD, DMS)
|
| 45 | 45 | observe.config.db.locale=La langue du référentiel (fr_FR, en_GB ou es_ES)
|
| 46 | 46 | observe.config.dcpPresetsDirectory.description=Répertoire des pré-configurations de DCP
|