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

Commits:

21 changed files:

Changes:

  • client-configuration/pom.xml
    ... ... @@ -102,6 +102,10 @@
    102 102
           <groupId>io.ultreia.java4all.jaxx</groupId>
    
    103 103
           <artifactId>jaxx-widgets-gis</artifactId>
    
    104 104
         </dependency>
    
    105
    +    <dependency>
    
    106
    +      <groupId>io.ultreia.java4all.jaxx</groupId>
    
    107
    +      <artifactId>jaxx-widgets-temperature</artifactId>
    
    108
    +    </dependency>
    
    105 109
     
    
    106 110
       </dependencies>
    
    107 111
     
    

  • client-configuration/src/main/config/Client.ini
    ... ... @@ -506,6 +506,12 @@ key = ui.coordinate.format
    506 506
     type = org.nuiton.jaxx.widgets.gis.CoordinateFormat
    
    507 507
     defaultValue = "dmd"
    
    508 508
     
    
    509
    +[option temperatureFormat]
    
    510
    +description = observe.config.temperature.format
    
    511
    +key = ui.temperature.format
    
    512
    +type = org.nuiton.jaxx.widgets.temperature.TemperatureFormat
    
    513
    +defaultValue = "C"
    
    514
    +
    
    509 515
     [option focusBorderColor]
    
    510 516
     description = observe.config.ui.focusBorderColor
    
    511 517
     key = ui.focusBorder.color
    

  • client-configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java
    ... ... @@ -37,6 +37,7 @@ import org.apache.commons.logging.LogFactory;
    37 37
     import org.nuiton.config.ApplicationConfig;
    
    38 38
     import org.nuiton.config.ArgumentsParserException;
    
    39 39
     import org.nuiton.jaxx.widgets.gis.CoordinateFormat;
    
    40
    +import org.nuiton.jaxx.widgets.temperature.TemperatureFormat;
    
    40 41
     import org.nuiton.version.Version;
    
    41 42
     import org.nuiton.version.Versions;
    
    42 43
     
    
    ... ... @@ -200,6 +201,11 @@ public class ClientConfig extends GeneratedClientConfig implements ClientApplica
    200 201
             return CoordinateFormat.valueOf(get().getOption(ClientConfigOption.COORDINATE_FORMAT.getKey()));
    
    201 202
         }
    
    202 203
     
    
    204
    +
    
    205
    +    public TemperatureFormat getTemperatureFormat() {
    
    206
    +        return get().getOption(TemperatureFormat.class, ClientConfigOption.TEMPERATURE_FORMAT.getKey());
    
    207
    +    }
    
    208
    +
    
    203 209
         @Override
    
    204 210
         public String getCopyrightText() {
    
    205 211
             if (copyrightText == null) {
    

  • client-configuration/src/main/resources/i18n/client-configuration_en_GB.properties
    ... ... @@ -72,6 +72,7 @@ observe.config.speciesList.seine.objectSchoolEstimate=Species for object school
    72 72
     observe.config.speciesList.seine.schoolEstimate=Species for school esitmates
    
    73 73
     observe.config.speciesList.seine.targetCatch=Species for target catches
    
    74 74
     observe.config.swingSessionFile.description=Swing session file.
    
    75
    +observe.config.temperature.format=Default temperature format
    
    75 76
     observe.config.ui.autoPopupNumberEditor=Flag sets to true when number editor show automaticly popup
    
    76 77
     observe.config.ui.changeSynchroSrc=Flag sets to true if you can change local source in admin tasks
    
    77 78
     observe.config.ui.focusBorderColor=Color of the focus container border
    

  • client-configuration/src/main/resources/i18n/client-configuration_es_ES.properties
    ... ... @@ -72,6 +72,7 @@ observe.config.speciesList.seine.objectSchoolEstimate=Especies para las estimaci
    72 72
     observe.config.speciesList.seine.schoolEstimate=Especies para las estimaciones
    
    73 73
     observe.config.speciesList.seine.targetCatch=Especies par las capturas objetivo
    
    74 74
     observe.config.swingSessionFile.description=Fichier de sauvegarde des états des UI. \#TODO
    
    75
    +observe.config.temperature.format=Default temperature format \#TODO
    
    75 76
     observe.config.ui.autoPopupNumberEditor=Para mostrar automáticamente el editor numérico durante la edición de un número
    
    76 77
     observe.config.ui.changeSynchroSrc=Pour autoriser la sélection de la base source dans les opérations sur base
    
    77 78
     observe.config.ui.focusBorderColor=Couleur de la bordure de la zone qui a le focus \#TODO
    

  • client-configuration/src/main/resources/i18n/client-configuration_fr_FR.properties
    ... ... @@ -72,6 +72,7 @@ observe.config.speciesList.seine.objectSchoolEstimate=Espèces pour les estimati
    72 72
     observe.config.speciesList.seine.schoolEstimate=Espèces pour les estimations
    
    73 73
     observe.config.speciesList.seine.targetCatch=Espèces pour les captures cible
    
    74 74
     observe.config.swingSessionFile.description=Fichier de sauvegarde des états des UI.
    
    75
    +observe.config.temperature.format=Unité de température
    
    75 76
     observe.config.ui.autoPopupNumberEditor=Pour afficher automatiquement l'éditeur numérique lors de l'édition d'un nombre
    
    76 77
     observe.config.ui.changeSynchroSrc=Pour autoriser la sélection de la base source dans les opérations sur base
    
    77 78
     observe.config.ui.focusBorderColor=Couleur de la bordure de la zone qui a le focus
    

  • client/src/main/java/fr/ird/observe/client/admin/validate/ValidationMessageTableRenderer.java
    ... ... @@ -46,7 +46,7 @@ public class ValidationMessageTableRenderer extends DefaultTableCellRenderer {
    46 46
     
    
    47 47
         private static final long serialVersionUID = 1L;
    
    48 48
     
    
    49
    -    private final ObserveI18nLabelsBuilder labelsBuilder = new ObserveI18nLabelsBuilder(null);
    
    49
    +    private final ObserveI18nLabelsBuilder labelsBuilder = ObserveI18nLabelsBuilder.fromNull();
    
    50 50
     
    
    51 51
         @Override
    
    52 52
         public Component getTableCellRendererComponent(JTable table,
    

  • client/src/main/java/fr/ird/observe/client/ds/editor/form/open/CommonOpenDataFormUI.jcss
    ... ... @@ -55,6 +55,14 @@ ReferentialComboBoxBeanEditor {
    55 55
       bean:{bean};
    
    56 56
     }
    
    57 57
     
    
    58
    +ReferentialDoubleListBeanEditor {
    
    59
    +  bean:{bean};
    
    60
    +}
    
    61
    +
    
    62
    +TemperatureBeanEditor {
    
    63
    +  bean:{bean};
    
    64
    +}
    
    65
    +
    
    58 66
     NormalTextBeanEditor {
    
    59 67
       model:{bean};
    
    60 68
     }
    

  • client/src/main/java/fr/ird/observe/client/ds/editor/form/open/seine/ActivitySeineUI.jaxx
    ... ... @@ -60,13 +60,8 @@
    60 60
         static org.nuiton.i18n.I18n.n
    
    61 61
       </import>
    
    62 62
     
    
    63
    -  <!-- model -->
    
    64 63
       <ActivitySeineUIModel id='model' title='observe.common.ActivitySeineDto.title'/>
    
    65
    -
    
    66
    -  <!-- edit bean -->
    
    67 64
       <ActivitySeineDto id='bean'/>
    
    68
    -
    
    69
    -  <!-- validator -->
    
    70 65
       <BeanValidator id='validator' autoField='true' beanClass='fr.ird.observe.dto.data.seine.ActivitySeineDto'
    
    71 66
                      errorTableModel='{getErrorTableModel()}' context='create'>
    
    72 67
     
    
    ... ... @@ -77,198 +72,191 @@
    77 72
     
    
    78 73
       </BeanValidator>
    
    79 74
     
    
    80
    -  <JPanel id="body">
    
    81
    -    <Table insets="0" fill="both" constraints='BorderLayout.CENTER'>
    
    82
    -      <row>
    
    83
    -        <cell anchor="north" weightx="1">
    
    84
    -          <JTabbedPane id='mainTabbedPane'>
    
    85
    -            <tab id='generalTab' computeI18n="">
    
    86
    -              <Table fill="both">
    
    87
    -                <!-- heure observation  -->
    
    88
    -                <row>
    
    89
    -                  <cell columns="2" weightx="1">
    
    90
    -                    <TimeBeanEditor id='time' styleClass="i18n"/>
    
    91
    -                  </cell>
    
    92
    -                </row>
    
    93
    -
    
    94
    -                <!--  position -->
    
    95
    -                <row>
    
    96
    -                  <cell anchor='west'>
    
    97
    -                    <JLabel id='coordinatesLabel'/>
    
    98
    -                  </cell>
    
    99
    -                  <cell anchor='east' fill="both">
    
    100
    -                    <CoordinatesBeanEditor id='coordinates'/>
    
    101
    -                  </cell>
    
    102
    -                </row>
    
    75
    +  <JPanel id="body" layout="{new BorderLayout()}">
    
    76
    +    <JTabbedPane id='mainTabbedPane' constraints='BorderLayout.CENTER'>
    
    77
    +      <tab id='generalTab' computeI18n="">
    
    78
    +        <Table fill="both">
    
    79
    +          <!-- heure observation  -->
    
    80
    +          <row>
    
    81
    +            <cell columns="2" weightx="1">
    
    82
    +              <TimeBeanEditor id='time' styleClass="i18n"/>
    
    83
    +            </cell>
    
    84
    +          </row>
    
    103 85
     
    
    104
    -                <!-- activity vessel -->
    
    105
    -                <row>
    
    106
    -                  <cell anchor='west' columns="2">
    
    107
    -                    <JLabel id='vesselActivityInformation' styleClass="skipI18n"/>
    
    108
    -                  </cell>
    
    109
    -                </row>
    
    110
    -                <row>
    
    111
    -                  <cell anchor='west'>
    
    112
    -                    <JLabel id='vesselActivitySeineLabel'/>
    
    113
    -                  </cell>
    
    114
    -                  <cell anchor='east' weightx="1">
    
    115
    -                    <ReferentialComboBoxBeanEditor id='vesselActivitySeine' genericType='VesselActivitySeineReference'/>
    
    116
    -                  </cell>
    
    117
    -                </row>
    
    86
    +          <!--  position -->
    
    87
    +          <row>
    
    88
    +            <cell anchor='west'>
    
    89
    +              <JLabel id='coordinatesLabel'/>
    
    90
    +            </cell>
    
    91
    +            <cell anchor='east' fill="both">
    
    92
    +              <CoordinatesBeanEditor id='coordinates'/>
    
    93
    +            </cell>
    
    94
    +          </row>
    
    118 95
     
    
    119
    -                <!--  activity environnante -->
    
    120
    -                <row>
    
    121
    -                  <cell anchor='west'>
    
    122
    -                    <JLabel id='surroundingActivityLabel'/>
    
    123
    -                  </cell>
    
    124
    -                  <cell anchor='east' weightx="1">
    
    125
    -                    <ReferentialComboBoxBeanEditor id='surroundingActivity' genericType='SurroundingActivityReference'/>
    
    126
    -                  </cell>
    
    127
    -                </row>
    
    96
    +          <!-- activity vessel -->
    
    97
    +          <row>
    
    98
    +            <cell anchor='west' columns="2">
    
    99
    +              <JLabel id='vesselActivityInformation' styleClass="skipI18n"/>
    
    100
    +            </cell>
    
    101
    +          </row>
    
    102
    +          <row>
    
    103
    +            <cell anchor='west'>
    
    104
    +              <JLabel id='vesselActivitySeineLabel'/>
    
    105
    +            </cell>
    
    106
    +            <cell anchor='east' weightx="1">
    
    107
    +              <ReferentialComboBoxBeanEditor id='vesselActivitySeine' genericType='VesselActivitySeineReference'/>
    
    108
    +            </cell>
    
    109
    +          </row>
    
    128 110
     
    
    129
    -                <!--  previousFpaZone -->
    
    130
    -                <row>
    
    131
    -                  <cell anchor='west'>
    
    132
    -                    <JLabel id='previousFpaZoneLabel'/>
    
    133
    -                  </cell>
    
    134
    -                  <cell anchor='east' weightx="1">
    
    135
    -                    <ReferentialComboBoxBeanEditor id='previousFpaZone' genericType='FpaZoneReference'/>
    
    136
    -                  </cell>
    
    137
    -                </row>
    
    111
    +          <!--  activity environnante -->
    
    112
    +          <row>
    
    113
    +            <cell anchor='west'>
    
    114
    +              <JLabel id='surroundingActivityLabel'/>
    
    115
    +            </cell>
    
    116
    +            <cell anchor='east' weightx="1">
    
    117
    +              <ReferentialComboBoxBeanEditor id='surroundingActivity' genericType='SurroundingActivityReference'/>
    
    118
    +            </cell>
    
    119
    +          </row>
    
    138 120
     
    
    139
    -                <!--  currentFpaZone -->
    
    140
    -                <row>
    
    141
    -                  <cell anchor='west'>
    
    142
    -                    <JLabel id='currentFpaZoneLabel'/>
    
    143
    -                  </cell>
    
    144
    -                  <cell anchor='east' weightx="1">
    
    145
    -                    <ReferentialComboBoxBeanEditor id='currentFpaZone' genericType='FpaZoneReference'/>
    
    146
    -                  </cell>
    
    147
    -                </row>
    
    121
    +          <!--  previousFpaZone -->
    
    122
    +          <row>
    
    123
    +            <cell anchor='west'>
    
    124
    +              <JLabel id='previousFpaZoneLabel'/>
    
    125
    +            </cell>
    
    126
    +            <cell anchor='east' weightx="1">
    
    127
    +              <ReferentialComboBoxBeanEditor id='previousFpaZone' genericType='FpaZoneReference'/>
    
    128
    +            </cell>
    
    129
    +          </row>
    
    148 130
     
    
    149
    -                <!--  nextFpaZone -->
    
    150
    -                <row>
    
    151
    -                  <cell anchor='west'>
    
    152
    -                    <JLabel id='nextFpaZoneLabel'/>
    
    153
    -                  </cell>
    
    154
    -                  <cell anchor='east' weightx="1">
    
    155
    -                    <ReferentialComboBoxBeanEditor id='nextFpaZone' genericType='FpaZoneReference'/>
    
    156
    -                  </cell>
    
    157
    -                </row>
    
    131
    +          <!--  currentFpaZone -->
    
    132
    +          <row>
    
    133
    +            <cell anchor='west'>
    
    134
    +              <JLabel id='currentFpaZoneLabel'/>
    
    135
    +            </cell>
    
    136
    +            <cell anchor='east' weightx="1">
    
    137
    +              <ReferentialComboBoxBeanEditor id='currentFpaZone' genericType='FpaZoneReference'/>
    
    138
    +            </cell>
    
    139
    +          </row>
    
    158 140
     
    
    159
    -                <!-- id ers  -->
    
    160
    -                <row>
    
    141
    +          <!--  nextFpaZone -->
    
    142
    +          <row>
    
    143
    +            <cell anchor='west'>
    
    144
    +              <JLabel id='nextFpaZoneLabel'/>
    
    145
    +            </cell>
    
    146
    +            <cell anchor='east' weightx="1">
    
    147
    +              <ReferentialComboBoxBeanEditor id='nextFpaZone' genericType='FpaZoneReference'/>
    
    148
    +            </cell>
    
    149
    +          </row>
    
    161 150
     
    
    162
    -                  <cell anchor='west'>
    
    163
    -                    <JLabel id='ersIdLabel'/>
    
    164
    -                  </cell>
    
    165
    -                  <cell anchor='east' weightx="1" fill="both">
    
    166
    -                    <NormalTextBeanEditor id='ersId'/>
    
    167
    -                  </cell>
    
    168
    -                </row>
    
    169
    -              </Table>
    
    170
    -            </tab>
    
    151
    +          <!-- id ers  -->
    
    152
    +          <row>
    
    171 153
     
    
    172
    -            <tab id='measurementsTab' computeI18n="">
    
    173
    -              <Table fill="both">
    
    174
    -                <!-- vitesse vessel -->
    
    175
    -                <row>
    
    176
    -                  <cell anchor='west'>
    
    177
    -                    <JLabel id='vesselSpeedLabel'/>
    
    178
    -                  </cell>
    
    179
    -                  <cell anchor='east' weightx="1" fill="both">
    
    180
    -                    <FloatBeanEditor id='vesselSpeed' styleClass="float2"/>
    
    181
    -                  </cell>
    
    182
    -                </row>
    
    154
    +            <cell anchor='west'>
    
    155
    +              <JLabel id='ersIdLabel'/>
    
    156
    +            </cell>
    
    157
    +            <cell anchor='east' weightx="1" fill="both">
    
    158
    +              <NormalTextBeanEditor id='ersId'/>
    
    159
    +            </cell>
    
    160
    +          </row>
    
    161
    +          <row>
    
    162
    +            <cell columns="2" weighty="1">
    
    163
    +              <JLabel styleClass="skipI18n"/>
    
    164
    +            </cell>
    
    165
    +          </row>
    
    166
    +        </Table>
    
    167
    +      </tab>
    
    183 168
     
    
    184
    -                <!-- température de surface -->
    
    185
    -                <row>
    
    186
    -                  <cell anchor='west'>
    
    187
    -                    <JLabel id='seaSurfaceTemperatureLabel'/>
    
    188
    -                  </cell>
    
    189
    -                  <cell anchor='east' fill="both">
    
    190
    -                    <TemperatureBeanEditor id='seaSurfaceTemperature'/>
    
    191
    -                  </cell>
    
    192
    -                </row>
    
    169
    +      <tab id='measurementsTab' computeI18n="">
    
    170
    +        <Table fill="both">
    
    171
    +          <!-- vitesse vessel -->
    
    172
    +          <row>
    
    173
    +            <cell anchor='west'>
    
    174
    +              <JLabel id='vesselSpeedLabel'/>
    
    175
    +            </cell>
    
    176
    +            <cell anchor='east' weightx="1" fill="both">
    
    177
    +              <FloatBeanEditor id='vesselSpeed' styleClass="float2"/>
    
    178
    +            </cell>
    
    179
    +          </row>
    
    193 180
     
    
    194
    -                <!--  vent beaufort -->
    
    195
    -                <row>
    
    196
    -                  <cell anchor='west'>
    
    197
    -                    <JLabel id='windLabel'/>
    
    198
    -                  </cell>
    
    199
    -                  <cell anchor='east'>
    
    200
    -                    <ReferentialComboBoxBeanEditor id='wind' genericType='WindReference'/>
    
    201
    -                  </cell>
    
    202
    -                </row>
    
    181
    +          <!-- température de surface -->
    
    182
    +          <row>
    
    183
    +            <cell anchor='west'>
    
    184
    +              <JLabel id='seaSurfaceTemperatureLabel'/>
    
    185
    +            </cell>
    
    186
    +            <cell anchor='east' fill="both">
    
    187
    +              <TemperatureBeanEditor id='seaSurfaceTemperature'/>
    
    188
    +            </cell>
    
    189
    +          </row>
    
    203 190
     
    
    204
    -                <!--  mode de détection -->
    
    205
    -                <row>
    
    206
    -                  <cell anchor='west'>
    
    207
    -                    <JLabel id='detectionModeLabel'/>
    
    208
    -                  </cell>
    
    209
    -                  <cell anchor='east'>
    
    210
    -                    <ReferentialComboBoxBeanEditor id='detectionMode' genericType='DetectionModeReference'/>
    
    211
    -                  </cell>
    
    212
    -                </row>
    
    191
    +          <!--  vent beaufort -->
    
    192
    +          <row>
    
    193
    +            <cell anchor='west'>
    
    194
    +              <JLabel id='windLabel'/>
    
    195
    +            </cell>
    
    196
    +            <cell anchor='east'>
    
    197
    +              <ReferentialComboBoxBeanEditor id='wind' genericType='WindReference'/>
    
    198
    +            </cell>
    
    199
    +          </row>
    
    213 200
     
    
    214
    -                <!-- cause non coups senne  -->
    
    215
    -                <row>
    
    216
    -                  <cell anchor='west'>
    
    217
    -                    <JLabel id='reasonForNoFishingLabel'/>
    
    218
    -                  </cell>
    
    219
    -                  <cell anchor='east'>
    
    220
    -                    <ReferentialComboBoxBeanEditor id='reasonForNoFishing' genericType='ReasonForNoFishingReference'/>
    
    221
    -                  </cell>
    
    222
    -                </row>
    
    223
    -                <row>
    
    224
    -                  <cell columns="2" weighty="1">
    
    225
    -                    <JLabel styleClass="skipI18n"/>
    
    226
    -                  </cell>
    
    227
    -                </row>
    
    228
    -              </Table>
    
    229
    -            </tab>
    
    201
    +          <!--  mode de détection -->
    
    202
    +          <row>
    
    203
    +            <cell anchor='west'>
    
    204
    +              <JLabel id='detectionModeLabel'/>
    
    205
    +            </cell>
    
    206
    +            <cell anchor='east'>
    
    207
    +              <ReferentialComboBoxBeanEditor id='detectionMode' genericType='DetectionModeReference'/>
    
    208
    +            </cell>
    
    209
    +          </row>
    
    230 210
     
    
    231
    -            <tab id="observedSystemTab" computeI18n="">
    
    232
    -              <Table fill="both">
    
    233
    -                <!-- systeme observe -->
    
    234
    -                <row>
    
    235
    -                  <cell columns="2" fill="both" weighty="0.7">
    
    236
    -                    <JScrollPane id='observedSystemPane' onFocusGained='observedSystem.requestFocus()'>
    
    237
    -                      <ReferentialDoubleListBeanEditor id='observedSystem' genericType='ObservedSystemReference'/>
    
    238
    -                    </JScrollPane>
    
    239
    -                  </cell>
    
    240
    -                </row>
    
    241
    -                <!-- distance au système observe -->
    
    242
    -                <row>
    
    243
    -                  <cell anchor='west'>
    
    244
    -                    <JLabel id='observedSystemDistanceLabel'/>
    
    245
    -                  </cell>
    
    246
    -                  <cell weightx="1" fill="both">
    
    247
    -                    <FloatBeanEditor id='observedSystemDistance' styleClass="float2"/>
    
    248
    -                  </cell>
    
    249
    -                </row>
    
    250
    -              </Table>
    
    251
    -            </tab>
    
    211
    +          <!-- cause non coups senne  -->
    
    212
    +          <row>
    
    213
    +            <cell anchor='west'>
    
    214
    +              <JLabel id='reasonForNoFishingLabel'/>
    
    215
    +            </cell>
    
    216
    +            <cell anchor='east'>
    
    217
    +              <ReferentialComboBoxBeanEditor id='reasonForNoFishing' genericType='ReasonForNoFishingReference'/>
    
    218
    +            </cell>
    
    219
    +          </row>
    
    220
    +          <row>
    
    221
    +            <cell columns="2" weighty="1">
    
    222
    +              <JLabel styleClass="skipI18n"/>
    
    223
    +            </cell>
    
    224
    +          </row>
    
    225
    +        </Table>
    
    226
    +      </tab>
    
    252 227
     
    
    253
    -          </JTabbedPane>
    
    254
    -        </cell>
    
    255
    -      </row>
    
    256
    -
    
    257
    -      <!--  comment -->
    
    258
    -      <row>
    
    259
    -        <cell columns='2' weighty="1">
    
    260
    -          <CommentBeanEditor id="comment"/>
    
    261
    -        </cell>
    
    262
    -      </row>
    
    263
    -    </Table>
    
    228
    +      <tab id="observedSystemTab" computeI18n="">
    
    229
    +        <Table fill="both">
    
    230
    +          <!-- systeme observe -->
    
    231
    +          <row>
    
    232
    +            <cell columns="2" fill="both" weighty="1">
    
    233
    +              <JScrollPane id='observedSystemPane' onFocusGained='observedSystem.requestFocus()'>
    
    234
    +                <ReferentialDoubleListBeanEditor id='observedSystem' genericType='ObservedSystemReference'/>
    
    235
    +              </JScrollPane>
    
    236
    +            </cell>
    
    237
    +          </row>
    
    238
    +          <!-- distance au système observe -->
    
    239
    +          <row>
    
    240
    +            <cell anchor='west'>
    
    241
    +              <JLabel id='observedSystemDistanceLabel'/>
    
    242
    +            </cell>
    
    243
    +            <cell weightx="1" fill="both">
    
    244
    +              <FloatBeanEditor id='observedSystemDistance' styleClass="float2"/>
    
    245
    +            </cell>
    
    246
    +          </row>
    
    247
    +        </Table>
    
    248
    +      </tab>
    
    249
    +    </JTabbedPane>
    
    250
    +    <CommentBeanEditor id="comment" constraints='BorderLayout.SOUTH'/>
    
    264 251
       </JPanel>
    
    252
    +
    
    265 253
       <Table id='extraActions' fill="both" weightx="1" insets='2'>
    
    266 254
         <row>
    
    267 255
           <cell weightx="0.5" fill="both">
    
    268
    -        <JButton id='addSet'/>
    
    256
    +        <JButton id='addSet' visible="true"/>
    
    269 257
           </cell>
    
    270 258
           <cell weightx="0.5" fill="both">
    
    271
    -        <JButton id='addDCP'/>
    
    259
    +        <JButton id='addDCP' visible="true"/>
    
    272 260
           </cell>
    
    273 261
         </row>
    
    274 262
       </Table>
    

  • client/src/main/java/fr/ird/observe/client/ds/editor/form/open/seine/ActivitySeineUIModel.java
    ... ... @@ -127,14 +127,6 @@ public class ActivitySeineUIModel extends OpenDataFormUIModel<ActivitySeineDto,
    127 127
             ObserveFormHelper.getApplicationDataSourceContext(ui).setOpenSetSeineId(setSeineId);
    
    128 128
         }
    
    129 129
     
    
    130
    -    public boolean isSetOperation() {
    
    131
    -        return bean.isSetOperation();
    
    132
    -    }
    
    133
    -
    
    134
    -    public boolean isDcpOperation() {
    
    135
    -        return bean.isDcpOperation();
    
    136
    -    }
    
    137
    -
    
    138 130
         public boolean isChangedZoneOperation() {
    
    139 131
             return VesselActivitySeineHelper.isChangedZoneOperation(bean.getVesselActivitySeine());
    
    140 132
         }
    
    ... ... @@ -176,10 +168,6 @@ public class ActivitySeineUIModel extends OpenDataFormUIModel<ActivitySeineDto,
    176 168
         public <U extends OpenDataFormUI<ActivitySeineDto, ActivitySeineReference>> void installUI(U ui) {
    
    177 169
             super.installUI(ui);
    
    178 170
             ActivitySeineUI ui1 = (ActivitySeineUI) ui;
    
    179
    -        ui1.getAddSet().setVisible(bean.isSetOperation() && bean.getSetSeine() == null);
    
    180
    -        ui1.getAddDCP().setVisible(bean.isDcpOperation());
    
    181
    -        ui.getExtraActions().setVisible(isUpdatingMode());
    
    182
    -
    
    183 171
             VesselActivitySeineReference fishingOperationActivity = getFishingOperationActivity();
    
    184 172
             String activity6Label = ClientApplicationContext.get().getDecoratorService().getReferentialReferenceDecorator(VesselActivitySeineReference.class).toString(fishingOperationActivity);
    
    185 173
     
    
    ... ... @@ -202,12 +190,39 @@ public class ActivitySeineUIModel extends OpenDataFormUIModel<ActivitySeineDto,
    202 190
         @Override
    
    203 191
         protected <U extends OpenDataFormUI<ActivitySeineDto, ActivitySeineReference>> void onModelPropertyChanged(U ui, String propertyName) {
    
    204 192
             super.onModelPropertyChanged(ui, propertyName);
    
    193
    +        boolean updateAddDcp = false;
    
    194
    +        boolean updateAddSet = false;
    
    195
    +        boolean updateExtraActions = false;
    
    205 196
             switch (propertyName) {
    
    206 197
                 case PROPERTY_MODIFIED:
    
    198
    +                updateAddDcp = true;
    
    199
    +                updateAddSet = true;
    
    200
    +                break;
    
    207 201
                 case PROPERTY_VALID:
    
    208
    -                boolean enabled = !isModified() && (isValid() || isHistoricalData());
    
    209
    -                ((ActivitySeineUI) ui).getAddSet().setEnabled(enabled);
    
    210
    -                ((ActivitySeineUI) ui).getAddDCP().setEnabled(enabled);
    
    202
    +                updateAddDcp = true;
    
    203
    +                updateAddSet = true;
    
    204
    +                break;
    
    205
    +            case PROPERTY_EDITING:
    
    206
    +                updateAddDcp = true;
    
    207
    +                updateAddSet = true;
    
    208
    +                break;
    
    209
    +            case PROPERTY_MODE:
    
    210
    +                updateAddDcp = true;
    
    211
    +                updateAddSet = true;
    
    212
    +                updateExtraActions = true;
    
    213
    +        }
    
    214
    +
    
    215
    +        ActivitySeineUI ui1 = (ActivitySeineUI) ui;
    
    216
    +        if (updateAddDcp) {
    
    217
    +            ui1.getAddDCP().setVisible(bean.isDcpOperation());
    
    218
    +            ui1.getAddDCP().setEnabled(ui1.getDelete().isEnabled());
    
    219
    +        }
    
    220
    +        if (updateAddSet) {
    
    221
    +            ui1.getAddSet().setVisible(bean.isSetOperation() && bean.getSetSeine() == null);
    
    222
    +            ui1.getAddSet().setEnabled(ui1.getDelete().isEnabled());
    
    223
    +        }
    
    224
    +        if (updateExtraActions) {
    
    225
    +            ui.getExtraActions().setVisible(isUpdatingMode());
    
    211 226
             }
    
    212 227
         }
    
    213 228
     
    

  • client/src/main/java/fr/ird/observe/client/ds/editor/form/openlist/longline/ActivityLonglineObsListUI.jaxx
    ... ... @@ -25,13 +25,9 @@
    25 25
       <import>
    
    26 26
         fr.ird.observe.dto.data.longline.ActivityLonglineObsDto
    
    27 27
         fr.ird.observe.dto.data.longline.ActivityLonglineObsReference
    
    28
    -    org.nuiton.jaxx.widgets.select.BeanListHeader
    
    29 28
       </import>
    
    30 29
     
    
    31 30
       <ActivityLonglineObsListUIModel id='model'/>
    
    32
    -  <JLabel id="emptyLabel" text='observe.common.ActivityLonglineObsDto.message.nonForTrip'/>
    
    33
    -  <BeanListHeader id='listHeader' labelText='observe.common.ActivityDto.list'/>
    
    34
    -
    
    35 31
       <JButton id='showSelectedData'/>
    
    36 32
       <JButton id='showOpenData'/>
    
    37 33
       <JButton id='openData'/>
    

  • client/src/main/java/fr/ird/observe/client/ds/editor/form/openlist/longline/ActivityLonglineObsListUIModel.java
    ... ... @@ -56,6 +56,16 @@ public class ActivityLonglineObsListUIModel extends OpenDataListFormUIModel<Acti
    56 56
         }
    
    57 57
     
    
    58 58
         @Override
    
    59
    +    public String getListEmptyLabel() {
    
    60
    +        return t("observe.common.ActivityLonglineObsDto.message.nonForTrip");
    
    61
    +    }
    
    62
    +
    
    63
    +    @Override
    
    64
    +    public String getListLabel() {
    
    65
    +        return t("observe.common.ActivityDto.list");
    
    66
    +    }
    
    67
    +
    
    68
    +    @Override
    
    59 69
         public void computeReadMessages(FormUIValidationMessageManager validationManager) {
    
    60 70
             if (isAnotherParentOpen()) {
    
    61 71
                 validationManager.addInfoMessage(n("observe.common.ActivityLonglineObsDto.message.active.found.for.other.trip"));
    

  • client/src/main/java/fr/ird/observe/client/ds/editor/form/openlist/longline/TripLonglineListUI.jaxx
    ... ... @@ -19,19 +19,14 @@
    19 19
       <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    20 20
       #L%
    
    21 21
       -->
    
    22
    -<fr.ird.observe.client.ds.editor.form.openlist.OpenDataListFormUI
    
    23
    -    superGenericType='TripLonglineDto, TripLonglineReference'>
    
    22
    +<fr.ird.observe.client.ds.editor.form.openlist.OpenDataListFormUI superGenericType='TripLonglineDto, TripLonglineReference'>
    
    24 23
     
    
    25 24
       <import>
    
    26 25
         fr.ird.observe.dto.data.longline.TripLonglineDto
    
    27 26
         fr.ird.observe.dto.data.longline.TripLonglineReference
    
    28
    -    org.nuiton.jaxx.widgets.select.BeanListHeader
    
    29 27
       </import>
    
    30 28
     
    
    31 29
       <TripLonglineListUIModel id='model'/>
    
    32
    -  <JLabel id="emptyLabel" text='observe.common.TripDto.message.noneForTrip'/>
    
    33
    -  <BeanListHeader id='listHeader' labelText='observe.common.TripDto.list'/>
    
    34
    -
    
    35 30
       <JButton id='showSelectedData'/>
    
    36 31
       <JButton id='showOpenData'/>
    
    37 32
       <JButton id='openData'/>
    

  • client/src/main/java/fr/ird/observe/client/ds/editor/form/openlist/longline/TripLonglineListUIModel.java
    ... ... @@ -54,6 +54,16 @@ public class TripLonglineListUIModel extends OpenDataListFormUIModel<TripLonglin
    54 54
         }
    
    55 55
     
    
    56 56
         @Override
    
    57
    +    public String getListEmptyLabel() {
    
    58
    +        return t("observe.common.TripDto.message.noneForTrip");
    
    59
    +    }
    
    60
    +
    
    61
    +    @Override
    
    62
    +    public String getListLabel() {
    
    63
    +        return t("observe.common.TripDto.list");
    
    64
    +    }
    
    65
    +
    
    66
    +    @Override
    
    57 67
         public void computeReadMessages(FormUIValidationMessageManager validationManager) {
    
    58 68
             validationManager.addInfoMessage(n("observe.common.TripLonglineDto.message.active.found.for.other.program"));
    
    59 69
         }
    

  • client/src/main/java/fr/ird/observe/client/ds/editor/form/openlist/seine/ActivitySeineListUI.jaxx
    ... ... @@ -25,12 +25,9 @@
    25 25
       <import>
    
    26 26
         fr.ird.observe.dto.data.seine.ActivitySeineDto
    
    27 27
         fr.ird.observe.dto.data.seine.ActivitySeineReference
    
    28
    -    org.nuiton.jaxx.widgets.select.BeanListHeader
    
    29 28
       </import>
    
    30 29
     
    
    31 30
       <ActivitySeineListUIModel id='model'/>
    
    32
    -  <JLabel id="emptyLabel" text='observe.common.ActivitySeineDto.message.noneForRoute'/>
    
    33
    -  <BeanListHeader id='listHeader' labelText='observe.common.ActivityDto.list'/>
    
    34 31
       <JButton id='showSelectedData'/>
    
    35 32
       <JButton id='showOpenData'/>
    
    36 33
       <JButton id='openData'/>
    

  • client/src/main/java/fr/ird/observe/client/ds/editor/form/openlist/seine/ActivitySeineListUIModel.java
    ... ... @@ -56,6 +56,16 @@ public class ActivitySeineListUIModel extends OpenDataListFormUIModel<ActivitySe
    56 56
         }
    
    57 57
     
    
    58 58
         @Override
    
    59
    +    public String getListEmptyLabel() {
    
    60
    +        return t("observe.common.ActivitySeineDto.message.noneForRoute");
    
    61
    +    }
    
    62
    +
    
    63
    +    @Override
    
    64
    +    public String getListLabel() {
    
    65
    +        return t("observe.common.ActivityDto.list");
    
    66
    +    }
    
    67
    +
    
    68
    +    @Override
    
    59 69
         public void computeReadMessages(FormUIValidationMessageManager validationManager) {
    
    60 70
             if (!ObserveClientApplicationContext.applicationDataContext().isOpenRoute()) {
    
    61 71
                 validationManager.addInfoMessage(n("observe.common.RouteDto.message.no.active.found"));
    

  • client/src/main/java/fr/ird/observe/client/ds/editor/form/openlist/seine/RouteListUI.jaxx
    ... ... @@ -25,12 +25,9 @@
    25 25
       <import>
    
    26 26
         fr.ird.observe.dto.data.seine.RouteDto
    
    27 27
         fr.ird.observe.dto.data.seine.RouteReference
    
    28
    -    org.nuiton.jaxx.widgets.select.BeanListHeader
    
    29 28
       </import>
    
    30 29
     
    
    31 30
       <RouteListUIModel id='model'/>
    
    32
    -  <JLabel id="emptyLabel" text='observe.common.RouteDto.noneForTrip'/>
    
    33
    -  <BeanListHeader id='listHeader' labelText='observe.common.RouteDto.list'/>
    
    34 31
       <JButton id='showSelectedData'/>
    
    35 32
       <JButton id='showOpenData'/>
    
    36 33
       <JButton id='openData'/>
    

  • client/src/main/java/fr/ird/observe/client/ds/editor/form/openlist/seine/RouteListUIModel.java
    ... ... @@ -56,6 +56,16 @@ public class RouteListUIModel extends OpenDataListFormUIModel<RouteDto, RouteRef
    56 56
         }
    
    57 57
     
    
    58 58
         @Override
    
    59
    +    public String getListEmptyLabel() {
    
    60
    +        return t("observe.common.RouteDto.noneForTrip");
    
    61
    +    }
    
    62
    +
    
    63
    +    @Override
    
    64
    +    public String getListLabel() {
    
    65
    +        return t("observe.common.RouteDto.list");
    
    66
    +    }
    
    67
    +
    
    68
    +    @Override
    
    59 69
         public void computeReadMessages(FormUIValidationMessageManager validationManager) {
    
    60 70
             if (isAnotherParentOpen()) {
    
    61 71
                 validationManager.addInfoMessage(n("observe.common.RouteDto.message.active.found.for.other.trip"));
    

  • client/src/main/java/fr/ird/observe/client/ds/editor/form/openlist/seine/TripSeineListUI.jaxx
    ... ... @@ -24,12 +24,9 @@
    24 24
       <import>
    
    25 25
         fr.ird.observe.dto.data.seine.TripSeineDto
    
    26 26
         fr.ird.observe.dto.data.seine.TripSeineReference
    
    27
    -    org.nuiton.jaxx.widgets.select.BeanListHeader
    
    28 27
       </import>
    
    29 28
     
    
    30 29
       <TripSeineListUIModel id='model'/>
    
    31
    -  <JLabel id="emptyLabel" text='observe.common.TripDto.message.noneForTrip'/>
    
    32
    -  <BeanListHeader id='listHeader' labelText='observe.common.TripDto.list'/>
    
    33 30
       <JButton id='showSelectedData'/>
    
    34 31
       <JButton id='showOpenData'/>
    
    35 32
       <JButton id='openData'/>
    

  • client/src/main/java/fr/ird/observe/client/ds/editor/form/openlist/seine/TripSeineListUIModel.java
    ... ... @@ -54,6 +54,16 @@ public class TripSeineListUIModel extends OpenDataListFormUIModel<TripSeineDto,
    54 54
         }
    
    55 55
     
    
    56 56
         @Override
    
    57
    +    public String getListEmptyLabel() {
    
    58
    +        return t("observe.common.TripDto.message.noneForTrip");
    
    59
    +    }
    
    60
    +
    
    61
    +    @Override
    
    62
    +    public String getListLabel() {
    
    63
    +        return t("observe.common.TripDto.list");
    
    64
    +    }
    
    65
    +
    
    66
    +    @Override
    
    57 67
         public void computeReadMessages(FormUIValidationMessageManager validationManager) {
    
    58 68
             validationManager.addInfoMessage(n("observe.common.TripSeineDto.message.active.found.for.other.program"));
    
    59 69
         }
    

  • dto/src/test/java/fr/ird/observe/spi/dto/DtoModuleHelperTest.java
    ... ... @@ -123,6 +123,11 @@ public class DtoModuleHelperTest {
    123 123
             Class<R> referenceType = typeContext.toReferenceType();
    
    124 124
             Assert.assertNotNull(referenceType);
    
    125 125
     
    
    126
    +        Class<? extends ReferentialDto> aClass = DtoModuleHelper.toReferentialDtoType(referenceType);
    
    127
    +        Assert.assertNotNull(aClass);
    
    128
    +        Assert.assertEquals(dtoType, aClass);
    
    129
    +
    
    130
    +
    
    126 131
             ReferentialDtoReferenceBinder<D, R> referenceBinder = typeContext.toReferenceBinder();
    
    127 132
             Assert.assertNotNull(referenceBinder);
    
    128 133
     
    
    ... ... @@ -170,9 +175,12 @@ public class DtoModuleHelperTest {
    170 175
                 referenceCount.increment();
    
    171 176
                 expectedNull = false;
    
    172 177
     
    
    178
    +            Class<? extends DataDto> aClass = DtoModuleHelper.toDataDtoType(referenceType);
    
    179
    +            Assert.assertNotNull(aClass);
    
    180
    +            Assert.assertEquals(dtoType, aClass);
    
    181
    +
    
    173 182
             } else {
    
    174 183
                 expectedNull = true;
    
    175
    -
    
    176 184
             }
    
    177 185
     
    
    178 186
             Assert.assertEquals(expectedNull, referenceBinder == null);
    
    ... ... @@ -183,10 +191,8 @@ public class DtoModuleHelperTest {
    183 191
                 R r = typeContext.newReferenceInstance(ReferentialLocale.FR);
    
    184 192
                 Assert.assertNotNull(r);
    
    185 193
             }
    
    186
    -
    
    187 194
         }
    
    188 195
     
    
    189
    -
    
    190 196
         private <D extends DataDto> void fromDataForm(Class<D> dtoType, MutableInt formCount) {
    
    191 197
     
    
    192 198
             Optional<FormDefinition<D>> typeContext = DtoModuleHelper.fromDataForm(dtoType);
    
    ... ... @@ -200,7 +206,6 @@ public class DtoModuleHelperTest {
    200 206
     
    
    201 207
                 // check
    
    202 208
             }
    
    203
    -
    
    204 209
         }
    
    205 210
     
    
    206 211
         private void assertCommonModel(CommonDtoModelDefinition model) {