Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe

Commits:

8 changed files:

Changes:

  • application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/NonTargetCatchReleaseDto-ui-update-error-validation.xml
    ... ... @@ -119,7 +119,7 @@
    119 119
     
    
    120 120
         <field-validator type="fieldexpression" short-circuit="true">
    
    121 121
           <param name="expression">
    
    122
    -        <![CDATA[ currentSetSeine.endPursingTime.time <= detectionTime.time ]]>
    
    122
    +        <![CDATA[ currentSetSeine.endPursingTime.time < detectionTime.time ]]>
    
    123 123
           </param>
    
    124 124
           <message>validator.ui.nonTargetCatchRelease.detectionTime.after.endPursingTimeStamp</message>
    
    125 125
         </field-validator>
    
    ... ... @@ -132,7 +132,7 @@
    132 132
         </field-validator>
    
    133 133
         <field-validator type="fieldexpression" short-circuit="true">
    
    134 134
           <param name="expression">
    
    135
    -        <![CDATA[ detectionTime == null || detectionTime.time <= releaseTime.time ]]>
    
    135
    +        <![CDATA[ detectionTime == null || detectionTime.time < releaseTime.time ]]>
    
    136 136
           </param>
    
    137 137
           <message>validator.ui.nonTargetCatchRelease.detectionTime.after.releaseTime</message>
    
    138 138
         </field-validator>
    

  • application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUIModel.java
    ... ... @@ -41,7 +41,7 @@ public class ActivitySeineUIModel extends ContentOpenableUIModel<ActivitySeineDt
    41 41
     
    
    42 42
         public static final String PROPERTY_GENERAL_TAB_VALID = "generalTabValid";
    
    43 43
     
    
    44
    -    public static final String PROPERTY_MEASUREMENTS_TAB_VALID = "materialsTabValid";
    
    44
    +    public static final String PROPERTY_MEASUREMENTS_TAB_VALID = "measurementsTabValid";
    
    45 45
     
    
    46 46
         public static final String PROPERTY_OBSERVED_SYSTEM_TAB_VALID = "observedSystemTabValid";
    
    47 47
     
    

  • application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchReleaseUI.jcss
    ... ... @@ -58,7 +58,7 @@
    58 58
     }
    
    59 59
     
    
    60 60
     #lengthLabel {
    
    61
    -  text:"observe.common.length";
    
    61
    +  text:"observe.common.length2";
    
    62 62
       labelFor:{length};
    
    63 63
     }
    
    64 64
     
    

  • application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchReleaseUIHandler.java
    ... ... @@ -91,11 +91,11 @@ public class NonTargetCatchReleaseUIHandler extends ContentTableUIHandler<SetSei
    91 91
     
    
    92 92
         private Map<String, SpeciesGroupDto> speciesGroupDtoMap;
    
    93 93
     
    
    94
    -    protected boolean toogleTimeEditorSliderIsChanging;
    
    94
    +    private boolean toogleTimeEditorSliderIsChanging;
    
    95 95
         // Change toogle target visible on all TimeEditors
    
    96
    -    protected final PropertyChangeListener onToogleTimeEditorSliderChangedListener;
    
    96
    +    private final PropertyChangeListener onToogleTimeEditorSliderChangedListener;
    
    97 97
     
    
    98
    -    public NonTargetCatchReleaseUIHandler() {
    
    98
    +    NonTargetCatchReleaseUIHandler() {
    
    99 99
             super(DataContextType.SetSeine);
    
    100 100
             speciesChanged = evt -> {
    
    101 101
                 if (!getTableModel().isAdjusting()) {
    
    ... ... @@ -111,12 +111,14 @@ public class NonTargetCatchReleaseUIHandler extends ContentTableUIHandler<SetSei
    111 111
     
    
    112 112
         private void updateSpecies(ReferentialReference<SpeciesDto> species, List<NonTargetCatchReleaseStatusDto> states) {
    
    113 113
     
    
    114
    +        ReferentialReference<SpeciesDto> oldSpecies = getTableEditBean().getSpecies();
    
    114 115
             JPanel statesContent = getUi().getStatesContent();
    
    115 116
             statesContent.removeAll();
    
    116 117
     
    
    117 118
             if (species == null) {
    
    118 119
                 getModel().setStates(Collections.emptyList(), states);
    
    119 120
                 getUi().getSpeciesGroupReleaseMode().setData(Collections.emptyList());
    
    121
    +            UIHelper.askFocus(getUi().getSpecies());
    
    120 122
                 return;
    
    121 123
             }
    
    122 124
             String speciesGroupId = (String) species.getPropertyValue(SpeciesDto.PROPERTY_SPECIES_GROUP + "Id");
    
    ... ... @@ -137,6 +139,8 @@ public class NonTargetCatchReleaseUIHandler extends ContentTableUIHandler<SetSei
    137 139
                 statesContent.add(u);
    
    138 140
             }
    
    139 141
             SwingUtilities.invokeLater(getUi()::revalidate);
    
    142
    +
    
    143
    +        UIHelper.askFocus(getUi().getSex());
    
    140 144
         }
    
    141 145
     
    
    142 146
         @Override
    
    ... ... @@ -177,7 +181,6 @@ public class NonTargetCatchReleaseUIHandler extends ContentTableUIHandler<SetSei
    177 181
             }
    
    178 182
     
    
    179 183
             ui.getSpecies().setData(availableEspeces);
    
    180
    -        UIHelper.askFocus(requestFocus);
    
    181 184
     
    
    182 185
             Date releaseTime;
    
    183 186
             Date detectionTime;
    
    ... ... @@ -201,6 +204,9 @@ public class NonTargetCatchReleaseUIHandler extends ContentTableUIHandler<SetSei
    201 204
     
    
    202 205
             bean.removePropertyChangeListener(NonTargetCatchReleaseDto.PROPERTY_SPECIES, speciesChanged);
    
    203 206
             bean.addPropertyChangeListener(NonTargetCatchReleaseDto.PROPERTY_SPECIES, speciesChanged);
    
    207
    +
    
    208
    +        log.info("Focus to "+requestFocus.getName());
    
    209
    +        UIHelper.askFocus(requestFocus);
    
    204 210
         }
    
    205 211
     
    
    206 212
         private static final List<String> SPECIES_GROUP_IDS = Arrays.asList(
    
    ... ... @@ -341,10 +347,10 @@ public class NonTargetCatchReleaseUIHandler extends ContentTableUIHandler<SetSei
    341 347
     
    
    342 348
             private final NonTargetCatchReleaseUI ui;
    
    343 349
     
    
    344
    -        public CatchLonglinesAutotSelectRowAndShowPopupAction(NonTargetCatchReleaseUI ui,
    
    345
    -                                                              JScrollPane pane,
    
    346
    -                                                              JTable table,
    
    347
    -                                                              JPopupMenu popup) {
    
    350
    +        CatchLonglinesAutotSelectRowAndShowPopupAction(NonTargetCatchReleaseUI ui,
    
    351
    +                                                       JScrollPane pane,
    
    352
    +                                                       JTable table,
    
    353
    +                                                       JPopupMenu popup) {
    
    348 354
                 super(pane, table, popup);
    
    349 355
                 this.ui = ui;
    
    350 356
             }
    

  • application-swing/src/main/resources/i18n/application-swing_en_GB.properties
    ... ... @@ -439,6 +439,7 @@ observe.common.lastName=Last name
    439 439
     observe.common.lastUpdateDate=Last update date
    
    440 440
     observe.common.latitude=Latitude
    
    441 441
     observe.common.length=Length
    
    442
    +observe.common.length2=Length (cm)
    
    442 443
     observe.common.length.computed.tip=Length was computed
    
    443 444
     observe.common.length.inf=Length (cm inf.)
    
    444 445
     observe.common.length.observed.tip=Length was observed
    

  • application-swing/src/main/resources/i18n/application-swing_es_ES.properties
    ... ... @@ -439,6 +439,7 @@ observe.common.lastName=Nombre
    439 439
     observe.common.lastUpdateDate=Last update date
    
    440 440
     observe.common.latitude=Latitud
    
    441 441
     observe.common.length=Longitud eslora total
    
    442
    +observe.common.len2gth=Longitud eslora total (cm) #TODO
    
    442 443
     observe.common.length.computed.tip=Longitud calculada
    
    443 444
     observe.common.length.inf=Longitud (cm inf.)
    
    444 445
     observe.common.length.observed.tip=Longitud observada
    

  • application-swing/src/main/resources/i18n/application-swing_fr_FR.properties
    ... ... @@ -444,6 +444,7 @@ observe.common.lastName=Nom
    444 444
     observe.common.lastUpdateDate=Date de dernière mise à jour
    
    445 445
     observe.common.latitude=Latitude
    
    446 446
     observe.common.length=Longueur hors tout
    
    447
    +observe.common.length2=Taille (cm)
    
    447 448
     observe.common.length.computed.tip=La longueur a été calculée
    
    448 449
     observe.common.length.inf=Longueur (cm inf.)
    
    449 450
     observe.common.length.observed.tip=La longueur a été observée
    

  • services-validation/src/main/resources/fr/ird/observe/entities/seine/NonTargetCatchRelease-service-error-validation.xml
    ... ... @@ -118,7 +118,7 @@
    118 118
     
    
    119 119
         <field-validator type="fieldexpression" short-circuit="true">
    
    120 120
           <param name="expression">
    
    121
    -        <![CDATA[ setSeineEntity.endPursingTime.time <= detectionTime.time ]]>
    
    121
    +        <![CDATA[ setSeineEntity.endPursingTime.time < detectionTime.time ]]>
    
    122 122
           </param>
    
    123 123
           <message>validator.service.nonTargetCatchRelease.detectionTime.after.endPursingTimeStamp</message>
    
    124 124
         </field-validator>
    
    ... ... @@ -132,7 +132,7 @@
    132 132
     
    
    133 133
         <field-validator type="fieldexpression" short-circuit="true">
    
    134 134
           <param name="expression">
    
    135
    -        <![CDATA[ detectionTime == null || detectionTime.time <= releaseTime.time ]]>
    
    135
    +        <![CDATA[ detectionTime == null || detectionTime.time < releaseTime.time ]]>
    
    136 136
           </param>
    
    137 137
           <message>validator.service.nonTargetCatchRelease.detectionTime.after.releaseTime</message>
    
    138 138
         </field-validator>