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

Commits:

4 changed files:

Changes:

  • client-core/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java
    ... ... @@ -76,9 +76,10 @@ public abstract class ObserveKeyStrokes {
    76 76
         public static final KeyStroke KEY_STROKE_SHOW_EMPTY_PROGRAM = KeyStroke.getKeyStroke("ctrl pressed F5");
    
    77 77
         public static final KeyStroke KEY_STROKE_CONFIGURE_LOCAL_SOURCE = KeyStroke.getKeyStroke("ctrl pressed L");
    
    78 78
         public static final KeyStroke KEY_STROKE_CONFIGURE_REMOTE_SOURCE = KeyStroke.getKeyStroke("ctrl pressed R");
    
    79
    -    public static final KeyStroke KEY_STROKE_CONFIGURE_SYNCHRO_FROM_LEFT = KeyStroke.getKeyStroke("ctrl pressed A");
    
    80
    -    public static final KeyStroke KEY_STROKE_CONFIGURE_SYNCHRO_FROM_RIGHT = KeyStroke.getKeyStroke("ctrl pressed B");
    
    81
    -    public static final KeyStroke KEY_STROKE_CONFIGURE_SYNCHRO_FROM_BOTH = KeyStroke.getKeyStroke("ctrl pressed C");
    
    79
    +    public static final KeyStroke KEY_STROKE_CONFIGURE_SYNCHRO_FROM_LEFT = KeyStroke.getKeyStroke("pressed F1");
    
    80
    +    public static final KeyStroke KEY_STROKE_CONFIGURE_SYNCHRO_FROM_RIGHT = KeyStroke.getKeyStroke("pressed F2");
    
    81
    +    public static final KeyStroke KEY_STROKE_CONFIGURE_SYNCHRO_FROM_BOTH = KeyStroke.getKeyStroke("pressed F3");
    
    82
    +    public static final KeyStroke KEY_STROKE_CONFIGURE_SYNCHRO_SHOW_PROPERTIES = KeyStroke.getKeyStroke("pressed F4");
    
    82 83
     
    
    83 84
         public static final KeyStroke KEY_STROKE_SAVE_TABLE_ENTRY = KeyStroke.getKeyStroke("ctrl pressed S");
    
    84 85
         public static final KeyStroke KEY_STROKE_PRESSED_ENTER = KeyStroke.getKeyStroke("pressed ENTER");
    

  • client-core/src/main/java/fr/ird/observe/client/ui/actions/admin/ObtainLeftSourceUIAction.java
    ... ... @@ -56,12 +56,14 @@ public class ObtainLeftSourceUIAction extends UIActionSupport {
    56 56
     
    
    57 57
         @Override
    
    58 58
         public void actionPerformed(ActionEvent e) {
    
    59
    +        AdminUIModel model = ui.getModel();
    
    60
    +        if (model.isWasStarted()) {
    
    61
    +            return;
    
    62
    +        }
    
    59 63
             log.info("start obtain left connexion");
    
    60 64
             StorageUIModel sourceModel = ui.getLocalSourceModel();
    
    61 65
             StorageUILauncher.obtainConnexion(ui, ui.getParentContainer(Window.class), sourceModel);
    
    62
    -        log.debug("After modifiy source model isValid : " + sourceModel.isValid() + " / " + sourceModel.isValidStep());
    
    63
    -
    
    64
    -        AdminUIModel model = ui.getModel();
    
    66
    +        log.debug(String.format("After modify source model isValid : %s / %s", sourceModel.isValid(), sourceModel.isValidStep()));
    
    65 67
             model.getConfigModel().removeLocalSource();
    
    66 68
             model.getConfigModel().getLocalSourceModel().validate();
    
    67 69
             model.validate();
    

  • client-core/src/main/java/fr/ird/observe/client/ui/actions/admin/ObtainRightSourceUIAction.java
    ... ... @@ -57,10 +57,14 @@ public class ObtainRightSourceUIAction extends UIActionSupport {
    57 57
     
    
    58 58
         @Override
    
    59 59
         public void actionPerformed(ActionEvent e) {
    
    60
    +        AdminUIModel model = ui.getModel();
    
    61
    +        if (model.isWasStarted()) {
    
    62
    +            return;
    
    63
    +        }
    
    60 64
             log.info("start obtain right connexion");
    
    61 65
             StorageUIModel sourceModel = ui.getCentralSourceModel();
    
    62 66
             StorageUILauncher.obtainConnexion(ui, ui.getParentContainer(Window.class), sourceModel);
    
    63
    -        AdminUIModel model = ui.getModel();
    
    67
    +        log.debug(String.format("After modify source model isValid : %s / %s", sourceModel.isValid(), sourceModel.isValidStep()));
    
    64 68
             model.getConfigModel().removeCentralSource();
    
    65 69
             model.getConfigModel().getCentralSourceModel().validate(StorageStep.CONFIG);
    
    66 70
             model.validate();
    

  • client-core/src/main/java/fr/ird/observe/client/ui/admin/synchronize/referential/ng/ReferentialSynchroUIHandler.java
    ... ... @@ -87,27 +87,47 @@ public class ReferentialSynchroUIHandler extends AdminTabUIHandler<ReferentialSy
    87 87
             configUI.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(ObserveKeyStrokes.KEY_STROKE_CONFIGURE_SYNCHRO_FROM_LEFT, "fromLeft");
    
    88 88
             configUI.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(ObserveKeyStrokes.KEY_STROKE_CONFIGURE_SYNCHRO_FROM_RIGHT, "fromRight");
    
    89 89
             configUI.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(ObserveKeyStrokes.KEY_STROKE_CONFIGURE_SYNCHRO_FROM_BOTH, "fromBoth");
    
    90
    +        configUI.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(ObserveKeyStrokes.KEY_STROKE_CONFIGURE_SYNCHRO_SHOW_PROPERTIES, "showProperties");
    
    90 91
             configUI.getActionMap().put("fromLeft", new AbstractAction() {
    
    91 92
                 @Override
    
    92 93
                 public void actionPerformed(ActionEvent e) {
    
    94
    +                if (getModel().isWasStarted()) {
    
    95
    +                    return;
    
    96
    +                }
    
    93 97
                     extraConfig.getLEFT_TO_RIGHT().doClick();
    
    94 98
                 }
    
    95 99
             });
    
    96 100
             configUI.getActionMap().put("fromRight", new AbstractAction() {
    
    97 101
                 @Override
    
    98 102
                 public void actionPerformed(ActionEvent e) {
    
    103
    +                if (getModel().isWasStarted()) {
    
    104
    +                    return;
    
    105
    +                }
    
    99 106
                     extraConfig.getRIGHT_TO_LEFT().doClick();
    
    100 107
                 }
    
    101 108
             });
    
    102 109
             configUI.getActionMap().put("fromBoth", new AbstractAction() {
    
    103 110
                 @Override
    
    104 111
                 public void actionPerformed(ActionEvent e) {
    
    112
    +                if (getModel().isWasStarted()) {
    
    113
    +                    return;
    
    114
    +                }
    
    105 115
                     extraConfig.getBOTH().doClick();
    
    106 116
                 }
    
    107 117
             });
    
    118
    +        configUI.getActionMap().put("showProperties", new AbstractAction() {
    
    119
    +            @Override
    
    120
    +            public void actionPerformed(ActionEvent e) {
    
    121
    +                if (getModel().isWasStarted()) {
    
    122
    +                    return;
    
    123
    +                }
    
    124
    +                extraConfig.getShowProperties().doClick();
    
    125
    +            }
    
    126
    +        });
    
    108 127
             ObserveKeyStrokes.addKeyStroke(extraConfig.getLEFT_TO_RIGHT(), ObserveKeyStrokes.KEY_STROKE_CONFIGURE_SYNCHRO_FROM_LEFT);
    
    109 128
             ObserveKeyStrokes.addKeyStroke(extraConfig.getRIGHT_TO_LEFT(), ObserveKeyStrokes.KEY_STROKE_CONFIGURE_SYNCHRO_FROM_RIGHT);
    
    110 129
             ObserveKeyStrokes.addKeyStroke(extraConfig.getBOTH(), ObserveKeyStrokes.KEY_STROKE_CONFIGURE_SYNCHRO_FROM_BOTH);
    
    130
    +        ObserveKeyStrokes.addKeyStroke(extraConfig.getShowProperties(), ObserveKeyStrokes.KEY_STROKE_CONFIGURE_SYNCHRO_SHOW_PROPERTIES);
    
    111 131
     
    
    112 132
             super.afterInit(this.ui);
    
    113 133