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

Commits:

2 changed files:

Changes:

  • client/src/main/java/fr/ird/observe/client/ui/storage/presets/RemotePresetsUIHandler.java
    ... ... @@ -26,6 +26,7 @@ import fr.ird.observe.client.ObserveSwingApplicationContext;
    26 26
     import fr.ird.observe.client.configuration.ClientConfig;
    
    27 27
     import fr.ird.observe.client.ui.actions.UIActionSupport;
    
    28 28
     import fr.ird.observe.client.ui.util.UIHelper;
    
    29
    +import fr.ird.observe.services.decoration.DecoratorService;
    
    29 30
     import fr.ird.observe.services.dto.presets.RemoteDataSourceConfiguration;
    
    30 31
     import fr.ird.observe.services.dto.presets.ServerDataSourceConfiguration;
    
    31 32
     import java.awt.BorderLayout;
    
    ... ... @@ -82,7 +83,7 @@ public class RemotePresetsUIHandler implements UIHandler<RemotePresetsUI> {
    82 83
     
    
    83 84
             }
    
    84 85
     
    
    85
    -        Decorator<RemoteDataSourceConfiguration> remoteDecorator = ObserveSwingApplicationContext.get().getDecoratorService().getDecoratorByType(RemoteDataSourceConfiguration.class);
    
    86
    +        Decorator<RemoteDataSourceConfiguration> remoteDecorator = ObserveSwingApplicationContext.get().getDecoratorService().getDecoratorByType(RemoteDataSourceConfiguration.class,DecoratorService.WITH_URL);
    
    86 87
     
    
    87 88
             ui.getRemoteConfigurations().setCellRenderer(new DecoratorListCellRenderer<>(remoteDecorator));
    
    88 89
             DefaultListModel<RemoteDataSourceConfiguration> remoteModel = new DefaultListModel<>();
    
    ... ... @@ -134,7 +135,7 @@ public class RemotePresetsUIHandler implements UIHandler<RemotePresetsUI> {
    134 135
                 SwingUtilities.invokeLater(ui::repaint);
    
    135 136
             });
    
    136 137
     
    
    137
    -        Decorator<ServerDataSourceConfiguration> serverDecorator = ObserveSwingApplicationContext.get().getDecoratorService().getDecoratorByType(ServerDataSourceConfiguration.class);
    
    138
    +        Decorator<ServerDataSourceConfiguration> serverDecorator = ObserveSwingApplicationContext.get().getDecoratorService().getDecoratorByType(ServerDataSourceConfiguration.class,DecoratorService.WITH_URL);
    
    138 139
             ui.getServerConfigurations().setCellRenderer(new DecoratorListCellRenderer<>(serverDecorator));
    
    139 140
             DefaultListModel<ServerDataSourceConfiguration> ServerModel = new DefaultListModel<>();
    
    140 141
             ui.getModel().getServerDataSourceConfigurations().forEach(ServerModel::addElement);
    

  • services/src/main/java/fr/ird/observe/services/decoration/DecoratorService.java
    ... ... @@ -175,6 +175,7 @@ public class DecoratorService extends DecoratorProvider {
    175 175
     
    
    176 176
         public static final String HAULING_IDENTIFIER = "haulingIdentifier";
    
    177 177
         public static final String TRIP_CONTEXT = "Trip";
    
    178
    +    public static final String WITH_URL = "WithUrl";
    
    178 179
     
    
    179 180
         /** la locale du referentiel. */
    
    180 181
         private ReferentialLocale referentialLocale;
    
    ... ... @@ -274,7 +275,9 @@ public class DecoratorService extends DecoratorProvider {
    274 275
     
    
    275 276
                 registerObserveDecorator(SectionTemplate.class, "${id}$s##${floatlineLengths}$s", " ");
    
    276 277
                 registerObserveDecorator(RemoteDataSourceConfiguration.class, "${name}$s", " ");
    
    278
    +            registerObserveDecorator(WITH_URL,RemoteDataSourceConfiguration.class, "${name}$s##${url}$s", " ");
    
    277 279
                 registerObserveDecorator(ServerDataSourceConfiguration.class, "${name}$s", " ");
    
    280
    +            registerObserveDecorator(WITH_URL,ServerDataSourceConfiguration.class, "${name}$s##${url}$s", " ");
    
    278 281
                 registerObserveDecorator(FloatingObjectReference.class, "${name}$s", " ");
    
    279 282
     
    
    280 283
             }