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

Commits:

9 changed files:

Changes:

  • client/core/src/main/java/fr/ird/observe/client/main/focus/MainUIFocusModel.java
    ... ... @@ -69,7 +69,7 @@ public class MainUIFocusModel extends UIFocusModel implements PropertyChangeList
    69 69
             this.keyboardFocusManager = Objects.requireNonNull(keyboardFocusManager);
    
    70 70
             this.acceptedClassesInBlockingLayer = new LinkedHashSet<>();
    
    71 71
             this.acceptedClassesInBlockingLayer.add(JTable.class);
    
    72
    -        this.acceptedClassesInBlockingLayer.add(JList.class);
    
    72
    +//        this.acceptedClassesInBlockingLayer.add(JList.class);
    
    73 73
             this.acceptedClassesInBlockingLayer.add(JScrollBar.class);
    
    74 74
             this.acceptedClassesInBlockingLayer.add(JTabbedPane.class);
    
    75 75
     
    

  • client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializer.java
    ... ... @@ -49,11 +49,9 @@ public class DefaultUIInitializer<UI extends JComponent & JAXXObject> extends UI
    49 49
     
    
    50 50
         public static final String CLIENT_PROPERTY_FORCE_LOAD = "forceLoad";
    
    51 51
         public static final String CLIENT_PROPERTY_LIST_NO_LOAD = "listNoLoad";
    
    52
    -    //    public static final String DELEGATE_CONTENT_UI = "delegateContentUI";
    
    53 52
         public static final String MAIN_TABBED_PANE = "mainTabbedPane";
    
    54 53
         public static final String SUB_TABBED_PANE = "subTabbedPane";
    
    55 54
     
    
    56
    -    public static final String CLIENT_PROPERTY_NOT_BLOCKING = "notBlocking";
    
    57 55
         public static final Class<?>[] MANAGED_TYPES = new Class<?>[]{
    
    58 56
                 JComponent.class,
    
    59 57
                 BeanCheckBox.class,
    
    ... ... @@ -192,10 +190,6 @@ public class DefaultUIInitializer<UI extends JComponent & JAXXObject> extends UI
    192 190
     
    
    193 191
         protected void init(JComponent editor) {
    
    194 192
             initializerContext.checkFirstPass();
    
    195
    -        final Boolean propertyName = (Boolean) editor.getClientProperty(CLIENT_PROPERTY_NOT_BLOCKING);
    
    196
    -        if (propertyName != null) {
    
    197
    -            initializerContext.addDoNotBlockComponentId(editor.getName());
    
    198
    -        }
    
    199 193
         }
    
    200 194
     
    
    201 195
     }
    

  • client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializerContext.java
    ... ... @@ -74,4 +74,30 @@ public class DefaultUIInitializerContext<U extends JAXXObject> extends UIInitial
    74 74
         public void setSubTabbedPaneValidator(JTabbedPane tabbedPane) {
    
    75 75
             this.subTabbedPaneValidator = JTabbedPaneValidator.builder((JAXXValidator) getUi(), tabbedPane.getName()).addScope(NuitonValidatorScope.ERROR, NuitonValidatorScope.WARNING).build();
    
    76 76
         }
    
    77
    +
    
    78
    +    @Override
    
    79
    +    public UIInitializerContext<U> startFirstPass() {
    
    80
    +        super.startFirstPass();
    
    81
    +        // Url
    
    82
    +        addDoNotBlockComponentId("openLink");
    
    83
    +        // JaxxComboBox, DoubleList, ListHeader
    
    84
    +        addDoNotBlockComponentId("displayDecorator");
    
    85
    +        // TripMap
    
    86
    +        addDoNotBlockComponentId("observeMapPane");
    
    87
    +        addDoNotBlockComponentId("zoomIt");
    
    88
    +        addDoNotBlockComponentId("zoomPlus");
    
    89
    +        addDoNotBlockComponentId("zoomMinus");
    
    90
    +        addDoNotBlockComponentId("exportPng");
    
    91
    +        addDoNotBlockComponentId("toggleLegend");
    
    92
    +        addDoNotBlockComponentId("addObservations");
    
    93
    +        addDoNotBlockComponentId("addLogbook");
    
    94
    +        // TemperatureEditor
    
    95
    +        addDoNotBlockComponentId("cFormat");
    
    96
    +        addDoNotBlockComponentId("fFormat");
    
    97
    +        // CoordinateEditor
    
    98
    +        addDoNotBlockComponentId("ddFormat");
    
    99
    +        addDoNotBlockComponentId("dmdFormat");
    
    100
    +        addDoNotBlockComponentId("dmsFormat");
    
    101
    +        return this;
    
    102
    +    }
    
    77 103
     }

  • client/core/src/main/java/fr/ird/observe/client/util/init/UIInitHelper.java
    ... ... @@ -185,7 +185,11 @@ public class UIInitHelper {
    185 185
             Objects.requireNonNull(label, "can't find label for temperature editor " + editor);
    
    186 186
             editor.setConfig(new TemperatureEditorConfig(TemperatureFormat.C, label.getText(), propertyName));
    
    187 187
             editor.init(label);
    
    188
    -        editor.getModel().addPropertyChangeListener("format", e -> validator.doValidate());
    
    188
    +        editor.getModel().addPropertyChangeListener("format", e -> {
    
    189
    +            if (validator.getBean() != null) {
    
    190
    +                validator.doValidate();
    
    191
    +            }
    
    192
    +        });
    
    189 193
         }
    
    190 194
     
    
    191 195
         public static void init(NumberEditor editor, boolean autoPopupNumberEditor, boolean showPopupButton) {
    

  • client/core/src/main/resources/fr/ird/observe/client/ui/ObserveCommon.jcss
    ... ... @@ -118,10 +118,6 @@ JToolBar {
    118 118
       opaque:false;
    
    119 119
     }
    
    120 120
     
    
    121
    -JTabbedPane {
    
    122
    -  _notBlocking: true;
    
    123
    -}
    
    124
    -
    
    125 121
     JXDatePicker {
    
    126 122
       formats:{"dd/MM/yyyy"};
    
    127 123
     }
    
    ... ... @@ -144,7 +140,6 @@ DoubleList {
    144 140
       showSelectPopupEnabled: false;
    
    145 141
       filterable:false;
    
    146 142
       autoSortSelectedList:true;
    
    147
    -  _notBlocking: true;
    
    148 143
     }
    
    149 144
     
    
    150 145
     JaxxComboBox {
    

  • client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIInitializer.java
    ... ... @@ -368,17 +368,6 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup
    368 368
     
    
    369 369
         protected void init(JComponent editor) {
    
    370 370
             initializerContext.checkFirstPass();
    
    371
    -        if (editor instanceof UrlEditor) {
    
    372
    -            initializerContext.addDoNotBlockComponentId("openLink");
    
    373
    -        } else if (editor.getClientProperty(DefaultUIInitializer.CLIENT_PROPERTY_NOT_BLOCKING) != null) {
    
    374
    -            initializerContext.addDoNotBlockComponentId(editor.getName());
    
    375
    -            ActionMap actionMap = editor.getActionMap();
    
    376
    -            if (actionMap.keys() != null) {
    
    377
    -                for (Object key : actionMap.keys()) {
    
    378
    -                    initializerContext.addDoNotBlockComponentId(key.toString());
    
    379
    -                }
    
    380
    -            }
    
    381
    -        }
    
    382 371
             Object property = editor.getClientProperty(CLIENT_PROPERTY_FOCUS_COMPONENT);
    
    383 372
             if (property == null) {
    
    384 373
                 return;
    

  • client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/common/TripUI.jcss
    ... ... @@ -94,8 +94,4 @@
    94 94
     
    
    95 95
     #mapTab {
    
    96 96
       enabled:{!states.isCreatingMode()};
    
    97
    -}
    
    98
    -
    
    99
    -#tripMap {
    
    100
    - _notBlocking:true;
    
    101
    -}
    97
    +}
    \ No newline at end of file

  • client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/SetDetailCompositionUI.jcss
    ... ... @@ -79,7 +79,6 @@
    79 79
     #sectionsTable {
    
    80 80
       model: {sectionsTableModel};
    
    81 81
       editable: {states.isEnabled()};
    
    82
    -  _notBlocking: true;
    
    83 82
     }
    
    84 83
     
    
    85 84
     #basketsPane {
    
    ... ... @@ -94,7 +93,6 @@
    94 93
     #basketsTable {
    
    95 94
       model: {basketsTableModel};
    
    96 95
       editable: {states.isEnabled()};
    
    97
    -  _notBlocking: true;
    
    98 96
     }
    
    99 97
     
    
    100 98
     #branchlinesPane {
    
    ... ... @@ -109,7 +107,6 @@
    109 107
     #branchlinesTable {
    
    110 108
       model: {branchlinesTableModel};
    
    111 109
       editable: {states.isEnabled()};
    
    112
    -  _notBlocking: true;
    
    113 110
     }
    
    114 111
     
    
    115 112
     /* ***************************************************************************** */
    

  • client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripUI.jcss
    ... ... @@ -34,8 +34,4 @@
    34 34
     
    
    35 35
     #mapTab {
    
    36 36
       enabled:{!states.isCreatingMode()};
    
    37
    -}
    
    38
    -
    
    39
    -#tripMap {
    
    40
    - _notBlocking:true;
    
    41
    -}
    37
    +}
    \ No newline at end of file