Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
-
81376acd
by tchemit at 2019-02-07T14:49:45Z
-
37246ad7
by tchemit at 2019-02-07T14:49:47Z
-
7e31647e
by tchemit at 2019-02-07T14:49:47Z
12 changed files:
- client-core/src/main/i18n/getters/java.getter
- client-core/src/main/java/fr/ird/observe/client/ui/admin/AdminTabUIHandler.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/AbstractSampleUIHandler.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetSampleUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetSampleUI.jcss
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/TargetSampleUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/storage/tabs/StorageTabUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/storage/tabs/StorageTabUIHandler.java
- observe-i18n/src/main/i18n/translations/observe_en_GB.properties
- observe-i18n/src/main/i18n/translations/observe_es_ES.properties
- observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
- pom.xml
Changes:
| ... | ... | @@ -502,6 +502,10 @@ observe.common.RouteDto.message.no.active.found |
| 502 | 502 |
observe.common.RouteDto.message.no.active.found.for.other.trip
|
| 503 | 503 |
observe.common.RouteDto.message.not.open
|
| 504 | 504 |
observe.common.RouteDto.message.updating
|
| 505 |
+observe.common.Sample.length.computed.tip
|
|
| 506 |
+observe.common.Sample.length.observed.tip
|
|
| 507 |
+observe.common.Sample.weight.computed.tip
|
|
| 508 |
+observe.common.Sample.weight.observed.tip
|
|
| 505 | 509 |
observe.common.SchoolEstimateDto.table.meanWeight
|
| 506 | 510 |
observe.common.SchoolEstimateDto.table.meanWeight.tip
|
| 507 | 511 |
observe.common.SchoolEstimateDto.table.speciesThon
|
| ... | ... | @@ -55,6 +55,7 @@ import org.nuiton.jaxx.runtime.swing.wizard.ext.WizardState; |
| 55 | 55 |
import org.nuiton.util.StringUtil;
|
| 56 | 56 |
|
| 57 | 57 |
import javax.swing.JOptionPane;
|
| 58 |
+import javax.swing.JTextArea;
|
|
| 58 | 59 |
import java.io.PrintWriter;
|
| 59 | 60 |
import java.io.StringWriter;
|
| 60 | 61 |
import java.util.Collection;
|
| ... | ... | @@ -192,7 +193,9 @@ public class AdminTabUIHandler<U extends AdminTabUI> { |
| 192 | 193 |
}
|
| 193 | 194 |
|
| 194 | 195 |
public void addMessage(AdminStep step, String text) {
|
| 195 |
- ui.getProgression().append(text + "\n");
|
|
| 196 |
+ JTextArea progression = ui.getProgression();
|
|
| 197 |
+ progression.append(text + "\n");
|
|
| 198 |
+ progression.setCaretPosition(progression.getDocument().getLength());
|
|
| 196 | 199 |
}
|
| 197 | 200 |
|
| 198 | 201 |
protected void logExportResult(String i18nKey,
|
| ... | ... | @@ -32,13 +32,15 @@ import fr.ird.observe.dto.data.seine.NonTargetLengthDto; |
| 32 | 32 |
import fr.ird.observe.dto.data.seine.TargetLengthDto;
|
| 33 | 33 |
import fr.ird.observe.dto.referential.SizeMeasureTypeReference;
|
| 34 | 34 |
import fr.ird.observe.dto.referential.SpeciesReference;
|
| 35 |
-import org.apache.logging.log4j.Logger;
|
|
| 36 | 35 |
import org.apache.logging.log4j.LogManager;
|
| 36 |
+import org.apache.logging.log4j.Logger;
|
|
| 37 | 37 |
|
| 38 | 38 |
import java.beans.PropertyChangeListener;
|
| 39 | 39 |
import java.util.List;
|
| 40 | 40 |
import java.util.Optional;
|
| 41 | 41 |
|
| 42 |
+import static io.ultreia.java4all.i18n.I18n.n;
|
|
| 43 |
+ |
|
| 42 | 44 |
/**
|
| 43 | 45 |
* Created on 31/10/16.
|
| 44 | 46 |
*
|
| ... | ... | @@ -47,6 +49,11 @@ import java.util.Optional; |
| 47 | 49 |
*/
|
| 48 | 50 |
public abstract class AbstractSampleUIHandler<E extends IdDto, D extends IdDto, U extends ContentTableUI<E, D, U>> extends ContentTableUIHandler<E, D, U> {
|
| 49 | 51 |
|
| 52 |
+ public static final String POIDS_COMPUTED_TIP = n("observe.common.Sample.weight.computed.tip");
|
|
| 53 |
+ public static final String POIDS_OBSERVED_TIP = n("observe.common.Sample.weight.observed.tip");
|
|
| 54 |
+ public static final String LONGUEUR_COMPUTED_TIP = n("observe.common.Sample.length.computed.tip");
|
|
| 55 |
+ public static final String LONGUEUR_OBSERVED_TIP = n("observe.common.Sample.length.observed.tip");
|
|
| 56 |
+ |
|
| 50 | 57 |
protected final Logger log = LogManager.getLogger(getClass());
|
| 51 | 58 |
/**
|
| 52 | 59 |
* Ecoute les modifications de la propriété {@link TargetLengthDto#getWeight()},
|
| ... | ... | @@ -83,22 +83,14 @@ |
| 83 | 83 |
|
| 84 | 84 |
<script><![CDATA[
|
| 85 | 85 |
|
| 86 |
-public static final String POIDS_COMPUTED_TIP = n("observe.common.Sample.weight.computed.tip");
|
|
| 87 |
-public static final String POIDS_OBSERVED_TIP = n("observe.common.Sample.weight.observed.tip");
|
|
| 88 |
-public static final String LONGUEUR_COMPUTED_TIP = n("observe.common.Sample.length.computed.tip");
|
|
| 89 |
-public static final String LONGUEUR_OBSERVED_TIP = n("observe.common.Sample.length.observed.tip");
|
|
| 90 |
- |
|
| 91 | 86 |
public String getWeightDataTip(boolean computed) {
|
| 92 |
- return computed ? t(POIDS_COMPUTED_TIP) : t(POIDS_OBSERVED_TIP);
|
|
| 87 |
+ return computed ? t(NonTargetSampleUIHandler.POIDS_COMPUTED_TIP) : t(NonTargetSampleUIHandler.POIDS_OBSERVED_TIP);
|
|
| 93 | 88 |
}
|
| 94 | 89 |
|
| 95 | 90 |
public String getLengthDataTip(boolean computed) {
|
| 96 |
- return computed ? t(LONGUEUR_COMPUTED_TIP) : t(LONGUEUR_OBSERVED_TIP);
|
|
| 91 |
+ return computed ? t(NonTargetSampleUIHandler.LONGUEUR_COMPUTED_TIP) : t(NonTargetSampleUIHandler.LONGUEUR_OBSERVED_TIP);
|
|
| 97 | 92 |
}
|
| 98 | 93 |
|
| 99 |
-public String getSpeciesFauneTypeTaille(SpeciesReference species) {
|
|
| 100 |
- return species == null ? t("observe.message.no.species.selected") : species.getSizeMeasureTypeId();
|
|
| 101 |
-}
|
|
| 102 | 94 |
]]>
|
| 103 | 95 |
</script>
|
| 104 | 96 |
|
| ... | ... | @@ -40,16 +40,6 @@ |
| 40 | 40 |
_resetTablePropertyName:{NonTargetLengthDto.PROPERTY_PICTURES_REFERENCES};
|
| 41 | 41 |
}
|
| 42 | 42 |
|
| 43 |
-#speciesTypeTailleLabel {
|
|
| 44 |
- actionIcon:"information";
|
|
| 45 |
- text:"observe.common.lengthMeasureType";
|
|
| 46 |
-}
|
|
| 47 |
- |
|
| 48 |
-#speciesTypeTaille {
|
|
| 49 |
- font-weight:"bold";
|
|
| 50 |
- text:{getSpeciesFauneTypeTaille(tableEditBean.getSpecies())};
|
|
| 51 |
-}
|
|
| 52 |
- |
|
| 53 | 43 |
#comment {
|
| 54 | 44 |
model:{getBean()};
|
| 55 | 45 |
}
|
| ... | ... | @@ -79,20 +79,15 @@ |
| 79 | 79 |
|
| 80 | 80 |
<script><![CDATA[
|
| 81 | 81 |
|
| 82 |
-public static final String POIDS_COMPUTED_TIP = n("observe.common.Sample.weight.computed.tip");
|
|
| 83 |
-public static final String POIDS_OBSERVED_TIP = n("observe.common.Sample.weight.observed.tip");
|
|
| 84 |
-public static final String LONGUEUR_COMPUTED_TIP = n("observe.common.Sample.length.computed.tip");
|
|
| 85 |
-public static final String LONGUEUR_OBSERVED_TIP = n("observe.common.Sample.length.observed.tip");
|
|
| 86 |
- |
|
| 87 | 82 |
@Override
|
| 88 | 83 |
public abstract TargetSampleUIHandler getHandler();
|
| 89 | 84 |
|
| 90 | 85 |
public String getWeightDataTip(boolean computed) {
|
| 91 |
- return computed ? t(POIDS_COMPUTED_TIP) : t(POIDS_OBSERVED_TIP);
|
|
| 86 |
+ return computed ? t(TargetSampleUIHandler.POIDS_COMPUTED_TIP) : t(TargetSampleUIHandler.POIDS_OBSERVED_TIP);
|
|
| 92 | 87 |
}
|
| 93 | 88 |
|
| 94 | 89 |
public String getLengthDataTip(boolean computed) {
|
| 95 |
- return computed ? t(LONGUEUR_COMPUTED_TIP) : t(LONGUEUR_OBSERVED_TIP);
|
|
| 90 |
+ return computed ? t(TargetSampleUIHandler.LONGUEUR_COMPUTED_TIP) : t(TargetSampleUIHandler.LONGUEUR_OBSERVED_TIP);
|
|
| 96 | 91 |
}
|
| 97 | 92 |
]]>
|
| 98 | 93 |
</script>
|
| ... | ... | @@ -64,13 +64,7 @@ protected void setDescriptionText(String text) { |
| 64 | 64 |
}
|
| 65 | 65 |
|
| 66 | 66 |
protected String getProgressString(int currentStep, int nbStep) {
|
| 67 |
- StorageStep step = getStep();
|
|
| 68 |
- String txt = "";
|
|
| 69 |
- if (step != null) {
|
|
| 70 |
- txt = n("observe.storage.step.label");
|
|
| 71 |
- txt = t(txt, currentStep + 1, nbStep, I18nEnumHelper.getLabel(step));
|
|
| 72 |
- }
|
|
| 73 |
- return txt;
|
|
| 67 |
+ return StorageTabUIHandler.getProgressString(currentStep, nbStep, getStep());
|
|
| 74 | 68 |
}
|
| 75 | 69 |
]]>
|
| 76 | 70 |
</script>
|
| ... | ... | @@ -23,12 +23,15 @@ package fr.ird.observe.client.ui.storage.tabs; |
| 23 | 23 |
|
| 24 | 24 |
import fr.ird.observe.client.ObserveSwingApplicationContext;
|
| 25 | 25 |
import fr.ird.observe.client.ObserveTextGenerator;
|
| 26 |
+import fr.ird.observe.client.ui.storage.StorageStep;
|
|
| 26 | 27 |
import fr.ird.observe.client.ui.storage.StorageUIModel;
|
| 28 |
+import fr.ird.observe.dto.I18nEnumHelper;
|
|
| 27 | 29 |
import fr.ird.observe.services.configuration.ObserveDataSourceInformation;
|
| 28 | 30 |
import org.nuiton.jaxx.runtime.JAXXObject;
|
| 29 | 31 |
|
| 30 | 32 |
import javax.swing.JLabel;
|
| 31 | 33 |
|
| 34 |
+import static io.ultreia.java4all.i18n.I18n.n;
|
|
| 32 | 35 |
import static io.ultreia.java4all.i18n.I18n.t;
|
| 33 | 36 |
|
| 34 | 37 |
/**
|
| ... | ... | @@ -80,4 +83,12 @@ public class StorageTabUIHandler<U extends JAXXObject> { |
| 80 | 83 |
this.ui = ui;
|
| 81 | 84 |
}
|
| 82 | 85 |
|
| 86 |
+ protected static String getProgressString(int currentStep, int nbStep,StorageStep step) {
|
|
| 87 |
+ String txt = "";
|
|
| 88 |
+ if (step != null) {
|
|
| 89 |
+ txt = n("observe.storage.step.label");
|
|
| 90 |
+ txt = t(txt, currentStep + 1, nbStep, I18nEnumHelper.getLabel(step));
|
|
| 91 |
+ }
|
|
| 92 |
+ return txt;
|
|
| 93 |
+ }
|
|
| 83 | 94 |
}
|
| ... | ... | @@ -1072,7 +1072,11 @@ observe.common.RouteDto.titles=Routes |
| 1072 | 1072 |
observe.common.RouteDto.type=Route
|
| 1073 | 1073 |
observe.common.RouteDto.types=Routes
|
| 1074 | 1074 |
observe.common.Sample.action.resetDefaultSizeMeasureType.tip=Use default size measure type
|
| 1075 |
+observe.common.Sample.length.computed.tip=Length was computed
|
|
| 1076 |
+observe.common.Sample.length.observed.tip=Length was observed
|
|
| 1075 | 1077 |
observe.common.Sample.weight=Individual weight (kg)
|
| 1078 |
+observe.common.Sample.weight.computed.tip=Weight was computed (%s)
|
|
| 1079 |
+observe.common.Sample.weight.observed.tip=Weight was observed
|
|
| 1076 | 1080 |
observe.common.SchoolEstimateDto.action.create=Insert this estimate
|
| 1077 | 1081 |
observe.common.SchoolEstimateDto.action.create.tip=Insert this estimate
|
| 1078 | 1082 |
observe.common.SchoolEstimateDto.meanWeight=Mean weight
|
| ... | ... | @@ -1072,7 +1072,11 @@ observe.common.RouteDto.titles=Rutas |
| 1072 | 1072 |
observe.common.RouteDto.type=Ruta
|
| 1073 | 1073 |
observe.common.RouteDto.types=Rutas
|
| 1074 | 1074 |
observe.common.Sample.action.resetDefaultSizeMeasureType.tip=Utilizar el tipo de medida por defecto
|
| 1075 |
+observe.common.Sample.length.computed.tip=Longitud calculada
|
|
| 1076 |
+observe.common.Sample.length.observed.tip=Longitud observada
|
|
| 1075 | 1077 |
observe.common.Sample.weight=Peso del ejemplar (en Kg)
|
| 1078 |
+observe.common.Sample.weight.computed.tip=Peso calculado
|
|
| 1079 |
+observe.common.Sample.weight.observed.tip=Peso observado
|
|
| 1076 | 1080 |
observe.common.SchoolEstimateDto.action.create=Insertar la estimación
|
| 1077 | 1081 |
observe.common.SchoolEstimateDto.action.create.tip=Insertar la nueva estimación en la tabla
|
| 1078 | 1082 |
observe.common.SchoolEstimateDto.meanWeight=Peso medio (en Kg)
|
| ... | ... | @@ -1072,7 +1072,11 @@ observe.common.RouteDto.titles=Routes |
| 1072 | 1072 |
observe.common.RouteDto.type=Route
|
| 1073 | 1073 |
observe.common.RouteDto.types=Routes
|
| 1074 | 1074 |
observe.common.Sample.action.resetDefaultSizeMeasureType.tip=Utiliser le type de mensuration par défaut
|
| 1075 |
+observe.common.Sample.length.computed.tip=La longueur a été calculée
|
|
| 1076 |
+observe.common.Sample.length.observed.tip=La longueur a été observée
|
|
| 1075 | 1077 |
observe.common.Sample.weight=Poids ind. (en Kg)
|
| 1078 |
+observe.common.Sample.weight.computed.tip=Le poids a été calculé
|
|
| 1079 |
+observe.common.Sample.weight.observed.tip=Le poids a été observé
|
|
| 1076 | 1080 |
observe.common.SchoolEstimateDto.action.create=Insérer cette estimation
|
| 1077 | 1081 |
observe.common.SchoolEstimateDto.action.create.tip=Insérer la nouvelle estimation dans la table
|
| 1078 | 1082 |
observe.common.SchoolEstimateDto.meanWeight=Poids moyen (en Kg)
|
| ... | ... | @@ -26,7 +26,7 @@ |
| 26 | 26 |
<parent>
|
| 27 | 27 |
<groupId>io.ultreia.maven</groupId>
|
| 28 | 28 |
<artifactId>pom</artifactId>
|
| 29 |
- <version>2019.8.7</version>
|
|
| 29 |
+ <version>2019.8.8</version>
|
|
| 30 | 30 |
</parent>
|
| 31 | 31 |
|
| 32 | 32 |
<groupId>fr.ird.observe</groupId>
|