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

Commits:

6 changed files:

Changes:

  • client/configuration/src/main/config/Client.ini
    ... ... @@ -898,7 +898,7 @@ defaultValue = java.awt.Color[r=255,g=0,b=0]
    898 898
     description = observe.config.ui.tree.node.unloaded.color
    
    899 899
     key = ui.tree.node.unloaded.color
    
    900 900
     type = color
    
    901
    -defaultValue = java.awt.Color[r=0,g=0,b=255]
    
    901
    +defaultValue = java.awt.Color[r=144,g=144,b=241]
    
    902 902
     
    
    903 903
     [option nodeEmptyColor]
    
    904 904
     description = observe.config.ui.tree.node.empty.color
    

  • client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIInitializer.java
    ... ... @@ -27,6 +27,7 @@ import fr.ird.observe.client.datasource.editor.api.content.actions.GoToTab;
    27 27
     import fr.ird.observe.client.datasource.editor.api.content.ui.DataReferenceListCellRenderer;
    
    28 28
     import fr.ird.observe.client.datasource.editor.api.content.ui.ReferentialReferenceListCellRenderer;
    
    29 29
     import fr.ird.observe.client.datasource.validation.ObserveSwingValidator;
    
    30
    +import fr.ird.observe.client.util.SpringUtilities;
    
    30 31
     import fr.ird.observe.client.util.init.DefaultUIInitializer;
    
    31 32
     import fr.ird.observe.client.util.init.DefaultUIInitializerContext;
    
    32 33
     import fr.ird.observe.client.util.init.DefaultUIInitializerResult;
    
    ... ... @@ -70,6 +71,8 @@ import javax.swing.JTabbedPane;
    70 71
     import javax.swing.JTable;
    
    71 72
     import javax.swing.JToolBar;
    
    72 73
     import javax.swing.ListCellRenderer;
    
    74
    +import javax.swing.SpringLayout;
    
    75
    +import java.awt.Container;
    
    73 76
     import java.util.ArrayList;
    
    74 77
     import java.util.Collection;
    
    75 78
     import java.util.Collections;
    
    ... ... @@ -88,6 +91,7 @@ import static io.ultreia.java4all.i18n.I18n.t;
    88 91
     public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSupport<UI, DefaultUIInitializerContext<UI>> implements WithClientUIContextApi {
    
    89 92
     
    
    90 93
         public static final String CLIENT_PROPERTY_FOCUS_COMPONENT = "focusComponent";
    
    94
    +    public static final String SPRING_LAYOUT = "SpringLayout";
    
    91 95
         public static final Class<?>[] MANAGED_TYPES = new Class<?>[]{
    
    92 96
                 JComponent.class,
    
    93 97
                 JToolBar.class,
    
    ... ... @@ -364,6 +368,10 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup
    364 368
     
    
    365 369
         protected void init(JComponent editor) {
    
    366 370
             initializerContext.checkFirstPass();
    
    371
    +        Object springLayout = editor.getClientProperty(SPRING_LAYOUT);
    
    372
    +        if (springLayout != null) {
    
    373
    +            setSpringLayout(editor, 2);
    
    374
    +        }
    
    367 375
             Object property = editor.getClientProperty(CLIENT_PROPERTY_FOCUS_COMPONENT);
    
    368 376
             if (property == null) {
    
    369 377
                 return;
    
    ... ... @@ -396,7 +404,14 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup
    396 404
                 editor.getColumnHeader().setFocusable(false);
    
    397 405
             }
    
    398 406
         }
    
    399
    -
    
    407
    +    public static void setSpringLayout(Container container, int columnCount) {
    
    408
    +        int rowCount = container.getComponentCount() / columnCount;
    
    409
    +        container.setLayout(new SpringLayout());
    
    410
    +        SpringUtilities.makeCompactGrid(container,
    
    411
    +                                        rowCount, columnCount, //rows, cols
    
    412
    +                                        3, 3,        //initX, initY
    
    413
    +                                        3, 3);       //xPad, yPad
    
    414
    +    }
    
    400 415
         //FIXME Add more methods to use ToolkitIdLabel
    
    401 416
         @SuppressWarnings({"unchecked", "rawtypes"})
    
    402 417
         private <R extends DataDtoReference> void prepareDataDoubleList(Class<R> dtoClass, DoubleList<R> editor) {
    

  • client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/LengthLengthParameterUI.jaxx
    ... ... @@ -105,7 +105,7 @@
    105 105
                     </cell>
    
    106 106
                   </row>
    
    107 107
                   <row>
    
    108
    -                <cell columns="2" weighty="1">
    
    108
    +                <cell columns="2" fill="both" weighty="1">
    
    109 109
                       <BigTextEditor id="source"/>
    
    110 110
                     </cell>
    
    111 111
                   </row>
    

  • client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/VesselUI.jaxx
    ... ... @@ -138,138 +138,48 @@
    138 138
               <tab id='otherTab' i18nProperty="">
    
    139 139
                 <Table fill="both">
    
    140 140
                   <row>
    
    141
    -                <cell anchor="west">
    
    142
    -                  <JLabel id='lengthLabel'/>
    
    143
    -                </cell>
    
    144
    -                <cell anchor='east' weightx="1" fill="both">
    
    145
    -                  <NumberEditor id='length' styleClass="float2"/>
    
    146
    -                </cell>
    
    147
    -              </row>
    
    148
    -              <row>
    
    149
    -                <cell anchor="west">
    
    150
    -                  <JLabel id='capacityLabel'/>
    
    151
    -                </cell>
    
    152
    -                <cell anchor='east' weightx="1" fill="both">
    
    153
    -                  <NumberEditor id='capacity' styleClass="float2"/>
    
    154
    -                </cell>
    
    155
    -              </row>
    
    156
    -              <row>
    
    157
    -                <cell anchor="west">
    
    158
    -                  <JLabel id='powerCvLabel'/>
    
    159
    -                </cell>
    
    160
    -                <cell anchor='east' weightx="1" fill="both">
    
    161
    -                  <NumberEditor id='powerCv' styleClass="int6"/>
    
    162
    -                </cell>
    
    163
    -              </row>
    
    164
    -              <row>
    
    165
    -                <cell anchor="west">
    
    166
    -                  <JLabel id='powerKWLabel'/>
    
    167
    -                </cell>
    
    168
    -                <cell anchor='east' weightx="1" fill="both">
    
    169
    -                  <NumberEditor id='powerKW' styleClass="float2"/>
    
    141
    +                <cell weightx="1">
    
    142
    +                  <JPanel id="otherTabPanel" _SpringLayout="true">
    
    143
    +                    <JLabel id='lengthLabel'/>
    
    144
    +                    <NumberEditor id='length' styleClass="float2"/>
    
    145
    +                    <JLabel id='capacityLabel'/>
    
    146
    +                    <NumberEditor id='capacity' styleClass="float2"/>
    
    147
    +                    <JLabel id='powerCvLabel'/>
    
    148
    +                    <NumberEditor id='powerCv' styleClass="int6"/>
    
    149
    +                    <JLabel id='powerKWLabel'/>
    
    150
    +                    <NumberEditor id='powerKW' styleClass="float2"/>
    
    151
    +                    <JLabel id='searchMaximumLabel'/>
    
    152
    +                    <NumberEditor id='searchMaximum' styleClass="float2"/>
    
    153
    +                    <JLabel id='yearServiceLabel'/>
    
    154
    +                    <NumberEditor id='yearService' styleClass="int6"/>
    
    155
    +                    <JLabel id='changeDateLabel'/>
    
    156
    +                    <DateEditor id='changeDate'/>
    
    157
    +                    <JLabel id='iotcIdLabel'/>
    
    158
    +                    <NormalTextEditor id='iotcId'/>
    
    159
    +                    <JLabel id='comIdLabel'/>
    
    160
    +                    <NormalTextEditor id='comId'/>
    
    161
    +                    <JLabel id='iccatLabel'/>
    
    162
    +                    <NormalTextEditor id='iccat'/>
    
    163
    +                    <JLabel id='imoIdLabel'/>
    
    164
    +                    <NormalTextEditor id='imoId'/>
    
    165
    +                    <JLabel id='nationalIdLabel'/>
    
    166
    +                    <NormalTextEditor id='nationalId'/>
    
    167
    +                    <JLabel id='radioCallSignIdLabel'/>
    
    168
    +                    <NormalTextEditor id='radioCallSignId'/>
    
    169
    +                    <JLabel id='tuviIdLabel'/>
    
    170
    +                    <NormalTextEditor id='tuviId'/>
    
    171
    +                    <JLabel id='lloydIdLabel'/>
    
    172
    +                    <NormalTextEditor id='lloydId'/>
    
    173
    +                    <JLabel id='shipOwnerLabel'/>
    
    174
    +                    <FilterableComboBox id='shipOwner' genericType='ShipOwnerReference'/>
    
    175
    +                  </JPanel>
    
    170 176
                     </cell>
    
    171 177
                   </row>
    
    172 178
                   <row>
    
    173
    -                <cell anchor="west">
    
    174
    -                  <JLabel id='searchMaximumLabel'/>
    
    175
    -                </cell>
    
    176
    -                <cell anchor='east' weightx="1" fill="both">
    
    177
    -                  <NumberEditor id='searchMaximum' styleClass="float2"/>
    
    178
    -                </cell>
    
    179
    -              </row>
    
    180
    -              <row>
    
    181
    -                <cell anchor="west">
    
    182
    -                  <JLabel id='yearServiceLabel'/>
    
    183
    -                </cell>
    
    184
    -                <cell anchor='east' weightx="1" fill="both">
    
    185
    -                  <NumberEditor id='yearService' styleClass="int6"/>
    
    186
    -                </cell>
    
    187
    -              </row>
    
    188
    -              <row>
    
    189
    -                <cell anchor='west'>
    
    190
    -                  <JLabel id='changeDateLabel'/>
    
    191
    -                </cell>
    
    192
    -                <cell anchor='west'>
    
    193
    -                  <DateEditor id='changeDate'/>
    
    194
    -                </cell>
    
    195
    -              </row>
    
    196
    -              <row>
    
    197
    -                <cell columns="2" weighty="1">
    
    179
    +                <cell weighty="1">
    
    198 180
                       <JLabel styleClass="skipI18n"/>
    
    199 181
                     </cell>
    
    200 182
                   </row>
    
    201
    -              <row>
    
    202
    -                <cell anchor="west">
    
    203
    -                  <JLabel id='iotcIdLabel'/>
    
    204
    -                </cell>
    
    205
    -                <cell anchor='east' weightx="1" fill="both">
    
    206
    -                  <NormalTextEditor id='iotcId'/>
    
    207
    -                </cell>
    
    208
    -              </row>
    
    209
    -              <row>
    
    210
    -                <cell anchor="west">
    
    211
    -                  <JLabel id='comIdLabel'/>
    
    212
    -                </cell>
    
    213
    -                <cell anchor='east' weightx="1" fill="both">
    
    214
    -                  <NormalTextEditor id='comId'/>
    
    215
    -                </cell>
    
    216
    -              </row>
    
    217
    -              <row>
    
    218
    -                <cell anchor="west">
    
    219
    -                  <JLabel id='iccatLabel'/>
    
    220
    -                </cell>
    
    221
    -                <cell anchor='east' weightx="1" fill="both">
    
    222
    -                  <NormalTextEditor id='iccat'/>
    
    223
    -                </cell>
    
    224
    -              </row>
    
    225
    -              <row>
    
    226
    -                <cell anchor="west">
    
    227
    -                  <JLabel id='imoIdLabel'/>
    
    228
    -                </cell>
    
    229
    -                <cell anchor='east' weightx="1" fill="both">
    
    230
    -                  <NormalTextEditor id='imoId'/>
    
    231
    -                </cell>
    
    232
    -              </row>
    
    233
    -              <row>
    
    234
    -                <cell anchor="west">
    
    235
    -                  <JLabel id='nationalIdLabel'/>
    
    236
    -                </cell>
    
    237
    -                <cell anchor='east' weightx="1" fill="both">
    
    238
    -                  <NormalTextEditor id='nationalId'/>
    
    239
    -                </cell>
    
    240
    -              </row>
    
    241
    -              <row>
    
    242
    -                <cell anchor="west">
    
    243
    -                  <JLabel id='radioCallSignIdLabel'/>
    
    244
    -                </cell>
    
    245
    -                <cell anchor='east' weightx="1" fill="both">
    
    246
    -                  <NormalTextEditor id='radioCallSignId'/>
    
    247
    -                </cell>
    
    248
    -              </row>
    
    249
    -              <row>
    
    250
    -                <cell anchor="west">
    
    251
    -                  <JLabel id='tuviIdLabel'/>
    
    252
    -                </cell>
    
    253
    -                <cell anchor='east' weightx="1" fill="both">
    
    254
    -                  <NormalTextEditor id='tuviId'/>
    
    255
    -                </cell>
    
    256
    -              </row>
    
    257
    -              <row>
    
    258
    -                <cell anchor="west">
    
    259
    -                  <JLabel id='lloydIdLabel'/>
    
    260
    -                </cell>
    
    261
    -                <cell anchor='east' weightx="1" fill="both">
    
    262
    -                  <NormalTextEditor id='lloydId'/>
    
    263
    -                </cell>
    
    264
    -              </row>
    
    265
    -              <row>
    
    266
    -                <cell anchor='west'>
    
    267
    -                  <JLabel id='shipOwnerLabel'/>
    
    268
    -                </cell>
    
    269
    -                <cell anchor='east' weightx="1" fill="both">
    
    270
    -                  <FilterableComboBox id='shipOwner' genericType='ShipOwnerReference'/>
    
    271
    -                </cell>
    
    272
    -              </row>
    
    273 183
                 </Table>
    
    274 184
               </tab>
    
    275 185
             </JTabbedPane>
    

  • client/runner/src/main/resources/META-INF/configuration/ClientConfig.md
    ... ... @@ -2165,7 +2165,7 @@ Description : **Configuration d'ObServe**
    2165 2165
     | Modifiable ? | Oui |
    
    2166 2166
     | Sauvegardable ? | Oui |
    
    2167 2167
     | Type | ```color``` |
    
    2168
    -| Valeur par défaut | ```java.awt.Color[r=0,g=0,b=255]``` |
    
    2168
    +| Valeur par défaut | ```java.awt.Color[r=144,g=144,b=241]``` |
    
    2169 2169
     
    
    2170 2170
     
    
    2171 2171
     ### <a name="detail_option_ui.tree.node.empty.color"></a>
    

  • client/runner/src/main/resources/META-INF/configuration/ClientConfig.properties
    ... ... @@ -1480,12 +1480,12 @@
    1480 1480
     # Clef                : ui.tree.node.unloaded.color
    
    1481 1481
     # Description         : Couleur pour un nœud non chargé
    
    1482 1482
     # Type                : color
    
    1483
    -# Valeur par défaut   : java.awt.Color[r=0,g=0,b=255]
    
    1483
    +# Valeur par défaut   : java.awt.Color[r=144,g=144,b=241]
    
    1484 1484
     # Modifiable ?        : Oui
    
    1485 1485
     # Sauvegardable ?     : Oui
    
    1486 1486
     # 
    
    1487 1487
     # Pour modifier l'option, veuillez décommenter la ligne suivante
    
    1488
    -# ui.tree.node.unloaded.color=java.awt.Color[r=0,g=0,b=255]
    
    1488
    +# ui.tree.node.unloaded.color=java.awt.Color[r=144,g=144,b=241]
    
    1489 1489
     
    
    1490 1490
     # Option              : nodeEmptyColor
    
    1491 1491
     # Clef                : ui.tree.node.empty.color