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

Commits:

8 changed files:

Changes:

  • client/datasource/editor/ll/src/main/i18n/getters/jaxx.getter
    ... ... @@ -94,6 +94,7 @@ observe.Common.processingCompany
    94 94
     observe.Common.proportion
    
    95 95
     observe.Common.proportionSum
    
    96 96
     observe.Common.relatedObservedActivity
    
    97
    +observe.Common.sampleReferences
    
    97 98
     observe.Common.seaSurfaceTemperature
    
    98 99
     observe.Common.section
    
    99 100
     observe.Common.sensorBrand
    

  • client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/SetCatchUI.jaxx
    ... ... @@ -123,17 +123,27 @@
    123 123
             <JTabbedPane id='mainTabbedPane'>
    
    124 124
               <tab id='caracteristicTab' i18nProperty="">
    
    125 125
                 <Table id='editForm' fill='both' insets='1'>
    
    126
    -
    
    127 126
                   <row>
    
    128
    -                <cell columns="2">
    
    129
    -                  <!-- acquisition Mode -->
    
    127
    +                <cell columns="2" rows="2">
    
    130 128
                       <JPanel id='acquisitionMode'>
    
    131 129
                         <JRadioButton id='acquisitionModeIndividual'/>
    
    132 130
                         <JRadioButton id='acquisitionModeGrouped'/>
    
    133 131
                       </JPanel>
    
    134 132
                     </cell>
    
    135
    -                <cell columns="2" rows="2">
    
    136
    -                  <!-- location on longline -->
    
    133
    +                <cell>
    
    134
    +                  <JLabel id='numberLabel'/>
    
    135
    +                </cell>
    
    136
    +                <cell weightx='1' anchor='east'>
    
    137
    +                  <NumberEditor id='number' styleClass="int6"/>
    
    138
    +                </cell>
    
    139
    +              </row>
    
    140
    +              <row>
    
    141
    +                <cell>
    
    142
    +                  <JPanel/>
    
    143
    +                </cell>
    
    144
    +              </row>
    
    145
    +              <row>
    
    146
    +                <cell columns="2" rows="5">
    
    137 147
                       <Table id="locationOnLonglinePanel">
    
    138 148
                         <row>
    
    139 149
                           <cell anchor="west">
    
    ... ... @@ -161,9 +171,6 @@
    161 171
                         </row>
    
    162 172
                       </Table>
    
    163 173
                     </cell>
    
    164
    -              </row>
    
    165
    -              <!-- species -->
    
    166
    -              <row>
    
    167 174
                     <cell>
    
    168 175
                       <JLabel id='speciesLabel'/>
    
    169 176
                     </cell>
    
    ... ... @@ -171,16 +178,7 @@
    171 178
                       <FilterableComboBox id='species' genericType='SpeciesReference'/>
    
    172 179
                     </cell>
    
    173 180
                   </row>
    
    174
    -
    
    175
    -              <!-- tagNumber -->
    
    176
    -              <!-- count -->
    
    177 181
                   <row>
    
    178
    -                <cell anchor='west'>
    
    179
    -                  <JLabel id='tagNumberLabel'/>
    
    180
    -                </cell>
    
    181
    -                <cell anchor='east' weightx="1" fill="both">
    
    182
    -                  <NormalTextEditor id='tagNumber'/>
    
    183
    -                </cell>
    
    184 182
                     <cell>
    
    185 183
                       <JLabel id='countLabel'/>
    
    186 184
                     </cell>
    
    ... ... @@ -188,15 +186,7 @@
    188 186
                       <NumberEditor id='count' styleClass="int6"/>
    
    189 187
                     </cell>
    
    190 188
                   </row>
    
    191
    -
    
    192
    -              <!-- number -->
    
    193 189
                   <row>
    
    194
    -                <cell>
    
    195
    -                  <JLabel id='numberLabel'/>
    
    196
    -                </cell>
    
    197
    -                <cell weightx='1' anchor='east'>
    
    198
    -                  <NumberEditor id='number' styleClass="int6"/>
    
    199
    -                </cell>
    
    200 190
                     <cell>
    
    201 191
                       <JLabel id='weightMeasureTypeLabel'/>
    
    202 192
                     </cell>
    
    ... ... @@ -204,9 +194,6 @@
    204 194
                       <FilterableComboBox id='weightMeasureType' genericType='WeightMeasureTypeReference'/>
    
    205 195
                     </cell>
    
    206 196
                   </row>
    
    207
    -
    
    208
    -              <!-- total weight -->
    
    209
    -              <!-- weightMeasureMethod -->
    
    210 197
                   <row>
    
    211 198
                     <cell>
    
    212 199
                       <JLabel id='totalWeightLabel'/>
    
    ... ... @@ -214,6 +201,8 @@
    214 201
                     <cell weightx='1' anchor='east'>
    
    215 202
                       <NumberEditor id='totalWeight' styleClass="float3"/>
    
    216 203
                     </cell>
    
    204
    +              </row>
    
    205
    +              <row>
    
    217 206
                     <cell>
    
    218 207
                       <JLabel id='weightMeasureMethodLabel'/>
    
    219 208
                     </cell>
    
    ... ... @@ -221,9 +210,6 @@
    221 210
                       <FilterableComboBox id='weightMeasureMethod' genericType='WeightMeasureMethodReference'/>
    
    222 211
                     </cell>
    
    223 212
                   </row>
    
    224
    -
    
    225
    -              <!-- catch healthStatus -->
    
    226
    -              <!-- hook position -->
    
    227 213
                   <row>
    
    228 214
                     <cell>
    
    229 215
                       <JLabel id='catchHealthStatusLabel'/>
    
    ... ... @@ -231,16 +217,7 @@
    231 217
                     <cell weightx='1' anchor='east'>
    
    232 218
                       <FilterableComboBox id='catchHealthStatus' genericType='HealthStatusReference'/>
    
    233 219
                     </cell>
    
    234
    -                <cell>
    
    235
    -                  <JLabel id='hookPositionLabel'/>
    
    236
    -                </cell>
    
    237
    -                <cell weightx='1' anchor='east'>
    
    238
    -                  <FilterableComboBox id='hookPosition' genericType='HookPositionReference'/>
    
    239
    -                </cell>
    
    240 220
                   </row>
    
    241
    -
    
    242
    -              <!-- catch fate -->
    
    243
    -              <!-- discard healthStatus -->
    
    244 221
                   <row>
    
    245 222
                     <cell>
    
    246 223
                       <JLabel id='catchFateLabel'/>
    
    ... ... @@ -255,24 +232,43 @@
    255 232
                       <FilterableComboBox id='discardHealthStatus' genericType='HealthStatusReference'/>
    
    256 233
                     </cell>
    
    257 234
                   </row>
    
    258
    -
    
    259
    -              <!-- hookWhenDiscarded -->
    
    260
    -              <!-- photoReferences -->
    
    261 235
                   <row>
    
    236
    +                <cell>
    
    237
    +                  <JLabel id='hookPositionLabel'/>
    
    238
    +                </cell>
    
    239
    +                <cell weightx='1' anchor='east'>
    
    240
    +                  <FilterableComboBox id='hookPosition' genericType='HookPositionReference'/>
    
    241
    +                </cell>
    
    262 242
                     <cell anchor="west">
    
    263 243
                       <JLabel id='hookWhenDiscardedLabel'/>
    
    264 244
                     </cell>
    
    265 245
                     <cell anchor='west' fill="both">
    
    266 246
                       <BooleanEditor id='hookWhenDiscarded'/>
    
    267 247
                     </cell>
    
    248
    +              </row>
    
    249
    +              <row>
    
    268 250
                     <cell anchor='west'>
    
    269 251
                       <JLabel id='photoReferencesLabel'/>
    
    270 252
                     </cell>
    
    271 253
                     <cell anchor='east' weightx="1" fill="both">
    
    272 254
                       <NormalTextEditor id='photoReferences'/>
    
    273 255
                     </cell>
    
    256
    +                <cell anchor='west'>
    
    257
    +                  <JLabel id='sampleReferencesLabel'/>
    
    258
    +                </cell>
    
    259
    +                <cell anchor='east' weightx="1" fill="both">
    
    260
    +                  <NormalTextEditor id='sampleReferences'/>
    
    261
    +                </cell>
    
    274 262
                   </row>
    
    263
    +              <row>
    
    264
    +                <cell anchor='west'>
    
    265
    +                  <JLabel id='tagNumberLabel'/>
    
    266
    +                </cell>
    
    267
    +                <cell anchor='east' weightx="1" fill="both">
    
    268
    +                  <NormalTextEditor id='tagNumber'/>
    
    269
    +                </cell>
    
    275 270
     
    
    271
    +              </row>
    
    276 272
                 </Table>
    
    277 273
               </tab>
    
    278 274
     
    

  • client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/SetCatchUI.jcss
    ... ... @@ -26,7 +26,7 @@
    26 26
     }
    
    27 27
     
    
    28 28
     #mainTabbedPane {
    
    29
    -  _focusComponent:{newComponentArray(acquisitionModeIndividual,depredated,beatDiameter)};
    
    29
    +  _focusComponent:{newComponentArray(number,depredated,beatDiameter)};
    
    30 30
     }
    
    31 31
     
    
    32 32
     /* ***************************************************************************** */
    

  • client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/SetCatchUIHandler.java
    ... ... @@ -43,7 +43,6 @@ import org.apache.logging.log4j.Logger;
    43 43
     import org.nuiton.jaxx.validator.swing.SwingValidator;
    
    44 44
     
    
    45 45
     import javax.swing.AbstractAction;
    
    46
    -import javax.swing.JComponent;
    
    47 46
     import javax.swing.JToolBar;
    
    48 47
     import java.awt.Component;
    
    49 48
     import java.awt.event.ActionEvent;
    
    ... ... @@ -74,19 +73,20 @@ public class SetCatchUIHandler extends GeneratedSetCatchUIHandler {
    74 73
     
    
    75 74
         @Override
    
    76 75
         protected Component getFocusComponentOnSelectedRow(SetCatchUI ui, boolean notPersisted, boolean newRow, CatchDto tableEditBean, CatchDto previousRowBean) {
    
    77
    -        JComponent requestFocus;
    
    78
    -        if (newRow) {
    
    79
    -            requestFocus = ui.getSpecies();
    
    80
    -        } else {
    
    81
    -            int acquisitionMode = tableEditBean.getAcquisitionMode();
    
    82
    -            CatchAcquisitionMode acquisitionModeEnum = CatchAcquisitionMode.valueOf(acquisitionMode);
    
    83
    -            if (acquisitionModeEnum.equals(CatchAcquisitionMode.GROUPED)) {
    
    84
    -                requestFocus = ui.getCount();
    
    85
    -            } else {
    
    86
    -                requestFocus = ui.getCatchHealthStatus();
    
    87
    -            }
    
    88
    -        }
    
    89
    -        return requestFocus;
    
    76
    +        //FIXME Review this on Focus clean session
    
    77
    +//        JComponent requestFocus;
    
    78
    +//        if (newRow) {
    
    79
    +//            requestFocus = ui.getNumber();
    
    80
    +//        } else {
    
    81
    +//            int acquisitionMode = tableEditBean.getAcquisitionMode();
    
    82
    +//            CatchAcquisitionMode acquisitionModeEnum = CatchAcquisitionMode.valueOf(acquisitionMode);
    
    83
    +//            if (acquisitionModeEnum.equals(CatchAcquisitionMode.GROUPED)) {
    
    84
    +//                requestFocus = ui.getCount();
    
    85
    +//            } else {
    
    86
    +//                requestFocus = ui.getCatchHealthStatus();
    
    87
    +//            }
    
    88
    +//        }
    
    89
    +        return ui.getNumber();
    
    90 90
         }
    
    91 91
     
    
    92 92
         @Override
    

  • client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/SetCatchUITableModel.java
    ... ... @@ -23,6 +23,7 @@ package fr.ird.observe.client.datasource.editor.ll.data.observation;
    23 23
      */
    
    24 24
     
    
    25 25
     import fr.ird.observe.client.util.table.EditableListProperty;
    
    26
    +import fr.ird.observe.client.util.table.renderer.DecoratorTableRenderer;
    
    26 27
     import fr.ird.observe.dto.data.CatchAcquisitionMode;
    
    27 28
     import fr.ird.observe.dto.data.ll.observation.CatchDto;
    
    28 29
     import fr.ird.observe.dto.data.ll.observation.SizeMeasureDto;
    
    ... ... @@ -30,6 +31,8 @@ import fr.ird.observe.dto.data.ll.observation.WeightMeasureDto;
    30 31
     import org.apache.logging.log4j.LogManager;
    
    31 32
     import org.apache.logging.log4j.Logger;
    
    32 33
     
    
    34
    +import javax.swing.JTable;
    
    35
    +import javax.swing.table.TableColumnModel;
    
    33 36
     import java.util.Collection;
    
    34 37
     import java.util.List;
    
    35 38
     
    
    ... ... @@ -79,6 +82,15 @@ public class SetCatchUITableModel extends GeneratedSetCatchUITableModel {
    79 82
             return weightMeasuresTableModel;
    
    80 83
         }
    
    81 84
     
    
    85
    +    @Override
    
    86
    +    public void initTableUISize(JTable table) {
    
    87
    +        super.initTableUISize(table);
    
    88
    +        TableColumnModel columnModel = table.getColumnModel();
    
    89
    +        ((DecoratorTableRenderer) columnModel.getColumn(2).getCellRenderer()).getDecorator().setIndex(1);
    
    90
    +        ((DecoratorTableRenderer) columnModel.getColumn(3).getCellRenderer()).getDecorator().setIndex(1);
    
    91
    +        ((DecoratorTableRenderer) columnModel.getColumn(4).getCellRenderer()).getDecorator().setIndex(1);
    
    92
    +    }
    
    93
    +
    
    82 94
         @Override
    
    83 95
         protected void onBeforeResetRow(int row) {
    
    84 96
             super.onBeforeResetRow(row);
    

  • core/services/i18n/src/main/i18n/translations/services_en_GB.properties
    ... ... @@ -816,7 +816,7 @@ observe.data.ll.observation.Catch.title=Catches
    816 816
     observe.data.ll.observation.Catch.totalWeight=Total weight (kg)
    
    817 817
     observe.data.ll.observation.Catch.totalWeight.short=Total weight (kg)
    
    818 818
     observe.data.ll.observation.Catch.type=Catch
    
    819
    -observe.data.ll.observation.Catch.weightMeasureType.validation.required=Total weight must be filled in group mode.
    
    819
    +observe.data.ll.observation.Catch.weightMeasureType.validation.required=Weight measure type must be filled in group mode if total weight is.
    
    820 820
     observe.data.ll.observation.Catch.weightMeasuresTab=Weights
    
    821 821
     observe.data.ll.observation.Encounter.action.create=Create a new encounter
    
    822 822
     observe.data.ll.observation.Encounter.action.save=Insert this encounter
    

  • core/services/i18n/src/main/i18n/translations/services_es_ES.properties
    ... ... @@ -816,7 +816,7 @@ observe.data.ll.observation.Catch.title=Capturas
    816 816
     observe.data.ll.observation.Catch.totalWeight=Peso total (kg)
    
    817 817
     observe.data.ll.observation.Catch.totalWeight.short=Peso total (kg)
    
    818 818
     observe.data.ll.observation.Catch.type=Captura
    
    819
    -observe.data.ll.observation.Catch.weightMeasureType.validation.required=Total weight must be filled in group mode. \#TODO
    
    819
    +observe.data.ll.observation.Catch.weightMeasureType.validation.required=Weight measure type must be filled in group mode if total weight is. \#TODO
    
    820 820
     observe.data.ll.observation.Catch.weightMeasuresTab=Pesos (kg)
    
    821 821
     observe.data.ll.observation.Encounter.action.create=Crear una nueva encuentro
    
    822 822
     observe.data.ll.observation.Encounter.action.save=Insertar este encuentro
    

  • core/services/i18n/src/main/i18n/translations/services_fr_FR.properties
    ... ... @@ -816,7 +816,7 @@ observe.data.ll.observation.Catch.title=Captures
    816 816
     observe.data.ll.observation.Catch.totalWeight=Poids total (kg)
    
    817 817
     observe.data.ll.observation.Catch.totalWeight.short=Poids total (kg)
    
    818 818
     observe.data.ll.observation.Catch.type=Capture
    
    819
    -observe.data.ll.observation.Catch.weightMeasureType.validation.required=Le poids total est obligatoire en mode groupé.
    
    819
    +observe.data.ll.observation.Catch.weightMeasureType.validation.required=Le type de pesée est obligatoire en mode groupé si le poids est renseigné.
    
    820 820
     observe.data.ll.observation.Catch.weightMeasuresTab=Poids (kg)
    
    821 821
     observe.data.ll.observation.Encounter.action.create=Nouvelle rencontre
    
    822 822
     observe.data.ll.observation.Encounter.action.save=Insérer cette rencontre