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

Commits:

1 changed file:

Changes:

  • client/src/main/java/fr/ird/observe/client/ui/storage/StorageUIHandler.java
    ... ... @@ -33,7 +33,6 @@ import fr.ird.observe.client.configuration.constants.CreationMode;
    33 33
     import fr.ird.observe.client.configuration.constants.DbMode;
    
    34 34
     import fr.ird.observe.client.db.ObserveSwingDataSource;
    
    35 35
     import fr.ird.observe.client.db.constants.ConnexionStatus;
    
    36
    -import fr.ird.observe.services.decoration.DecoratorService;
    
    37 36
     import fr.ird.observe.client.ui.ObserveKeyStrokes;
    
    38 37
     import fr.ird.observe.client.ui.ObserveMainUI;
    
    39 38
     import fr.ird.observe.client.ui.UIHelper;
    
    ... ... @@ -48,6 +47,7 @@ import fr.ird.observe.services.configuration.ObserveDataSourceInformation;
    48 47
     import fr.ird.observe.services.configuration.rest.ObserveDataSourceConfigurationRest;
    
    49 48
     import fr.ird.observe.services.configuration.topia.ObserveDataSourceConfigurationTopiaH2;
    
    50 49
     import fr.ird.observe.services.configuration.topia.ObserveDataSourceConfigurationTopiaPG;
    
    50
    +import fr.ird.observe.services.decoration.DecoratorService;
    
    51 51
     import fr.ird.observe.services.dto.ObserveDbUserDto;
    
    52 52
     import fr.ird.observe.services.dto.source.DataSourceCreateConfigurationDto;
    
    53 53
     import fr.ird.observe.services.service.sql.AddSqlScriptProducerRequest;
    
    ... ... @@ -105,7 +105,7 @@ public class StorageUIHandler implements UIHandler<StorageUI> {
    105 105
             SwingUtilities.invokeLater(() -> {
    
    106 106
                 JComponent focusOwner = getFocusComponent(ui.getModel().getStep());
    
    107 107
                 if (focusOwner != null) {
    
    108
    -                focusOwner.grabFocus();
    
    108
    +                UIHelper.askFocus(focusOwner);
    
    109 109
                 }
    
    110 110
             });
    
    111 111
     
    
    ... ... @@ -113,7 +113,7 @@ public class StorageUIHandler implements UIHandler<StorageUI> {
    113 113
             ui.setVisible(true);
    
    114 114
         }
    
    115 115
     
    
    116
    -    public JComponent getFocusComponent(StorageStep newStep) {
    
    116
    +    private JComponent getFocusComponent(StorageStep newStep) {
    
    117 117
     
    
    118 118
             DbMode dbMode = ui.getModel().getDbMode();
    
    119 119
             JComponent focusOwner;
    
    ... ... @@ -198,7 +198,7 @@ public class StorageUIHandler implements UIHandler<StorageUI> {
    198 198
             return focusOwner;
    
    199 199
         }
    
    200 200
     
    
    201
    -    public void onStepChanged(StorageStep oldStep, StorageStep newStep) {
    
    201
    +    void onStepChanged(StorageStep oldStep, StorageStep newStep) {
    
    202 202
             if (newStep == null) {
    
    203 203
                 return;
    
    204 204
             }
    
    ... ... @@ -292,14 +292,13 @@ public class StorageUIHandler implements UIHandler<StorageUI> {
    292 292
     
    
    293 293
             }
    
    294 294
     
    
    295
    -
    
    296 295
             JComponent focusComponent = getFocusComponent(newStep);
    
    297 296
             if (focusComponent != null) {
    
    298
    -            focusComponent.requestFocusInWindow();
    
    297
    +            UIHelper.askFocus(focusComponent);
    
    299 298
             }
    
    300 299
         }
    
    301 300
     
    
    302
    -    public void launchApply() {
    
    301
    +    void launchApply() {
    
    303 302
     
    
    304 303
             ui.getModel().setAlreadyApplied(true);
    
    305 304
     
    
    ... ... @@ -329,7 +328,7 @@ public class StorageUIHandler implements UIHandler<StorageUI> {
    329 328
             }
    
    330 329
         }
    
    331 330
     
    
    332
    -    public void launchCancel() {
    
    331
    +    void launchCancel() {
    
    333 332
     
    
    334 333
             Runnable action = WizardUILancher.CANCEL_DEF.getContextValue(ui);
    
    335 334
     
    
    ... ... @@ -587,7 +586,7 @@ public class StorageUIHandler implements UIHandler<StorageUI> {
    587 586
          * @param dumpProducerService le service de dump
    
    588 587
          * @param dst                 le fichier de sauvegarde
    
    589 588
          */
    
    590
    -    public void backupLocalDatabase(SqlScriptProducerService dumpProducerService, File dst) {
    
    589
    +    private void backupLocalDatabase(SqlScriptProducerService dumpProducerService, File dst) {
    
    591 590
             if (dst == null) {
    
    592 591
                 throw new IllegalArgumentException(
    
    593 592
                         "file where to backup can not be null");
    
    ... ... @@ -709,7 +708,7 @@ public class StorageUIHandler implements UIHandler<StorageUI> {
    709 708
             model.init(ui, dataSourceConfiguration);
    
    710 709
         }
    
    711 710
     
    
    712
    -    protected void initSelectData(StorageUI ui) {
    
    711
    +    private void initSelectData(StorageUI ui) {
    
    713 712
     
    
    714 713
             StorageUIModel model = ui.getModel();
    
    715 714
     
    
    ... ... @@ -777,7 +776,7 @@ public class StorageUIHandler implements UIHandler<StorageUI> {
    777 776
             }
    
    778 777
         }
    
    779 778
     
    
    780
    -    protected void updateSecurity(StorageUIModel model, RolesTableModel roleModel) {
    
    779
    +    private void updateSecurity(StorageUIModel model, RolesTableModel roleModel) {
    
    781 780
     
    
    782 781
             SecurityModel security = model.getSecurityModel();
    
    783 782
     
    
    ... ... @@ -817,7 +816,7 @@ public class StorageUIHandler implements UIHandler<StorageUI> {
    817 816
     
    
    818 817
         }
    
    819 818
     
    
    820
    -    protected String computeReport(StorageStep step) {
    
    819
    +    private String computeReport(StorageStep step) {
    
    821 820
             if (log.isDebugEnabled()) {
    
    822 821
                 log.debug("Build report from step " + step);
    
    823 822
             }