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

Commits:

5 changed files:

Changes:

  • client-configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java
    ... ... @@ -133,7 +133,7 @@ public class ClientConfig extends GeneratedClientConfig implements TemplateGener
    133 133
                 ClientConfigOption.OBSTUNA_CAN_MIGRATE.getKey(),
    
    134 134
         };
    
    135 135
     
    
    136
    -    private final SimpleDateFormat dateFormat = new SimpleDateFormat();
    
    136
    +    private final SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm z");
    
    137 137
         /**
    
    138 138
          * un drapeau pour savoir s'il faut lancer l'interface graphique. Cette
    
    139 139
          * valeur peut être programmées lors des actions.
    
    ... ... @@ -426,7 +426,7 @@ public class ClientConfig extends GeneratedClientConfig implements TemplateGener
    426 426
         }
    
    427 427
     
    
    428 428
         public String getApplicationName() {
    
    429
    -        return get().getOption(ApplicationConfig.APP_NAME);
    
    429
    +        return get().getOption("application.name");
    
    430 430
         }
    
    431 431
     
    
    432 432
         @Override
    

  • client-core/src/main/java/fr/ird/observe/client/main/ObserveMainUI.jaxx
    ... ... @@ -90,12 +90,6 @@ public void destroy() {
    90 90
         handler.destroy();
    
    91 91
     }
    
    92 92
     
    
    93
    -@Override
    
    94
    -protected void finalize() throws Throwable {
    
    95
    -    super.finalize();
    
    96
    -    destroy();
    
    97
    -}
    
    98
    -
    
    99 93
     ]]>
    
    100 94
       </script>
    
    101 95
     
    

  • client-core/src/main/java/fr/ird/observe/client/main/ObserveMainUIHandler.java
    ... ... @@ -34,10 +34,10 @@ import fr.ird.observe.client.util.busy.BusyModel;
    34 34
     import org.apache.logging.log4j.LogManager;
    
    35 35
     import org.apache.logging.log4j.Logger;
    
    36 36
     import org.nuiton.jaxx.runtime.spi.UIHandler;
    
    37
    +import org.nuiton.jaxx.runtime.swing.action.JAXXObjectActionSupport;
    
    37 38
     import org.nuiton.jaxx.widgets.error.ErrorDialogUI;
    
    38 39
     
    
    39 40
     import javax.swing.JComponent;
    
    40
    -import javax.swing.KeyStroke;
    
    41 41
     import java.awt.KeyboardFocusManager;
    
    42 42
     import java.util.Locale;
    
    43 43
     
    
    ... ... @@ -92,6 +92,7 @@ public class ObserveMainUIHandler implements UIHandler<ObserveMainUI>, WithClien
    92 92
             ErrorDialogUI.init(ui);
    
    93 93
     
    
    94 94
             BusyModel busyModel = getClientUIContext().getBusyModel();
    
    95
    +        JAXXObjectActionSupport.makeActionsEnabledOnlyIfMenuItemParentIsOpened(ui.getJMenuBar());
    
    95 96
     
    
    96 97
             ObserveKeyStrokesSupport.addKeyStrokeFromMnemonic(ui);
    
    97 98
     
    
    ... ... @@ -101,7 +102,6 @@ public class ObserveMainUIHandler implements UIHandler<ObserveMainUI>, WithClien
    101 102
             BusyLayerUI.create(ui, busyModel);
    
    102 103
     
    
    103 104
             ui.getMenu().setEnabled(!busyModel.isBusy());
    
    104
    -        ui.getMenuLanguage().setAccelerator(KeyStroke.getKeyStroke("pressed L"));
    
    105 105
     
    
    106 106
             reload(model, getClientConfig(), busyModel);
    
    107 107
     
    

  • client-datasource-editor-api/src/main/java/fr/ird/observe/client/datasource/editor/DataSourceEditorBodyContent.java
    ... ... @@ -50,6 +50,7 @@ import org.apache.logging.log4j.LogManager;
    50 50
     import org.apache.logging.log4j.Logger;
    
    51 51
     
    
    52 52
     import javax.swing.BoundedRangeModel;
    
    53
    +import java.beans.PropertyChangeListener;
    
    53 54
     import java.util.Set;
    
    54 55
     import java.util.function.Supplier;
    
    55 56
     
    
    ... ... @@ -64,6 +65,7 @@ public class DataSourceEditorBodyContent extends MainUIBodyContent<DataSourceEdi
    64 65
     
    
    65 66
         private static final Logger log = LogManager.getLogger(DataSourceEditorBodyContent.class);
    
    66 67
     
    
    68
    +    private final PropertyChangeListener reload;
    
    67 69
         private DataSourceEditorMenu editorMenu;
    
    68 70
         private DataSourceEditorNavigationMenu navigationMenu;
    
    69 71
         private ObserveSwingDataSource dataSource;
    
    ... ... @@ -71,6 +73,7 @@ public class DataSourceEditorBodyContent extends MainUIBodyContent<DataSourceEdi
    71 73
         public DataSourceEditorBodyContent() {
    
    72 74
             super(1, DataSourceEditor.class);
    
    73 75
             setSupplier(SingletonSupplier.of(createSupplier()));
    
    76
    +        this.reload = e -> reload();
    
    74 77
         }
    
    75 78
     
    
    76 79
         private Supplier<DataSourceEditor> createSupplier() {
    
    ... ... @@ -92,24 +95,15 @@ public class DataSourceEditorBodyContent extends MainUIBodyContent<DataSourceEdi
    92 95
     
    
    93 96
             editorMenu.getUiModel().init();
    
    94 97
             navigationMenu.getUiModel().init();
    
    95
    -
    
    96
    -        getClientUIContext().getBusyModel().addPropertyChangeListener(BusyModel.BUSY_PROPERTY_NAME, evt -> reload());
    
    98
    +        mainUI.getBusyModel().addPropertyChangeListener(BusyModel.BUSY_PROPERTY_NAME, reload);
    
    97 99
             ShowDataSourcePresetsAction.init(mainUI, mainUI.getShowDataSourcePresets(), ShowDataSourcePresetsAction.class);
    
    98 100
         }
    
    99 101
     
    
    100
    -//    @Override
    
    101
    -//    public void uninstall(ObserveMainUI mainUI) {
    
    102
    -//        super.uninstall(mainUI);
    
    103
    -//        if (dataSource != null && dataSource.isOpen()) {
    
    104
    -//            log.info("Closing main data source..");
    
    105
    -//            try {
    
    106
    -//                dataSource.close();
    
    107
    -//            } finally {
    
    108
    -//                setDataSource(null);
    
    109
    -//                getObserveDataSourcesManager().setMainDataSource(null);
    
    110
    -//            }
    
    111
    -//        }
    
    112
    -//    }
    
    102
    +    @Override
    
    103
    +    public void uninstall(ObserveMainUI mainUI) {
    
    104
    +        super.uninstall(mainUI);
    
    105
    +        mainUI.getBusyModel().removePropertyChangeListener(BusyModel.BUSY_PROPERTY_NAME, reload);
    
    106
    +    }
    
    113 107
     
    
    114 108
         @Override
    
    115 109
         public void show(ObserveMainUI mainUI) {
    

  • pom.xml
    ... ... @@ -24,7 +24,7 @@
    24 24
       <parent>
    
    25 25
         <groupId>io.ultreia.maven</groupId>
    
    26 26
         <artifactId>pom</artifactId>
    
    27
    -    <version>2020.32</version>
    
    27
    +    <version>2020.33</version>
    
    28 28
       </parent>
    
    29 29
     
    
    30 30
       <groupId>fr.ird.observe</groupId>
    
    ... ... @@ -170,7 +170,7 @@
    170 170
     
    
    171 171
         <!--    <lib.version.java4all.topia>1.17</lib.version.java4all.topia>-->
    
    172 172
         <!--<lib.version.java4all.eugene>3.0<-alpha-22</lib.version.java4all.eugene>-->
    
    173
    -<!--    <lib.version.java4all.jaxx>3.0-alpha-67-SNAPSHOT</lib.version.java4all.jaxx>-->
    
    173
    +<!--    <lib.version.java4all.jaxx>3.0-alpha-70-SNAPSHOT</lib.version.java4all.jaxx>-->
    
    174 174
         <!--<lib.version.java4all.application-context>1.0.3-SNAPSHOT</lib.version.java4all.application-context>-->
    
    175 175
         <!--<lib.version.java4all.application-template>1.0.2-SNAPSHOT</lib.version.java4all.application-template>-->
    
    176 176
         <!--<lib.version.java4all.i18n>4.0-beta-3-SNAPSHOT</lib.version.java4all.i18n>-->