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

Commits:

4 changed files:

Changes:

  • client/pom.xml
    ... ... @@ -626,7 +626,7 @@
    626 626
         <dependency>
    
    627 627
           <groupId>org.jetbrains</groupId>
    
    628 628
           <artifactId>annotations</artifactId>
    
    629
    -      <version>RELEASE</version>
    
    629
    +      <version>15.0</version>
    
    630 630
         </dependency>
    
    631 631
     
    
    632 632
       </dependencies>
    

  • client/src/main/java/fr/ird/observe/client/ui/content/table/GearUseFeatureMeasurementCellRenderer.java
    ... ... @@ -23,7 +23,6 @@ package fr.ird.observe.client.ui.content.table;
    23 23
      */
    
    24 24
     
    
    25 25
     import fr.ird.observe.client.ui.util.UIHelper;
    
    26
    -import fr.ird.observe.dto.referential.GearCaracteristicDto;
    
    27 26
     import fr.ird.observe.dto.referential.GearCaracteristicReference;
    
    28 27
     import fr.ird.observe.dto.referential.GearCaracteristicTypeHelper;
    
    29 28
     import java.awt.Component;
    
    ... ... @@ -41,9 +40,8 @@ import javax.swing.table.TableCellRenderer;
    41 40
      */
    
    42 41
     public class GearUseFeatureMeasurementCellRenderer implements TableCellRenderer {
    
    43 42
     
    
    44
    -    protected final int caracteristicColumn;
    
    45
    -
    
    46
    -    protected final Map<String, TableCellRenderer> renderersByCaracteristicTypeId;
    
    43
    +    private final int caracteristicColumn;
    
    44
    +    private final Map<String, TableCellRenderer> renderersByCaracteristicTypeId;
    
    47 45
     
    
    48 46
     
    
    49 47
         public GearUseFeatureMeasurementCellRenderer(int caracteristicColumn, DefaultTableCellRenderer renderer) {
    
    ... ... @@ -90,7 +88,7 @@ public class GearUseFeatureMeasurementCellRenderer implements TableCellRenderer
    90 88
                 tableCellRenderer = table.getDefaultRenderer(Object.class);
    
    91 89
     
    
    92 90
             } else {
    
    93
    -            String gearCaracteristicTypeId = caracteristicRef.getPropertyValue(GearCaracteristicDto.PROPERTY_GEAR_CARACTERISTIC_TYPE);
    
    91
    +            String gearCaracteristicTypeId = caracteristicRef.getGearCaracteristicTypeId();
    
    94 92
     
    
    95 93
                 tableCellRenderer = renderersByCaracteristicTypeId.get(gearCaracteristicTypeId);
    
    96 94
     
    

  • client/src/main/java/fr/ird/observe/client/ui/tree/navigation/NavigationTree.java
    ... ... @@ -10,19 +10,18 @@ package fr.ird.observe.client.ui.tree.navigation;
    10 10
      * it under the terms of the GNU General Public License as
    
    11 11
      * published by the Free Software Foundation, either version 3 of the
    
    12 12
      * License, or (at your option) any later version.
    
    13
    - * 
    
    13
    + *
    
    14 14
      * This program is distributed in the hope that it will be useful,
    
    15 15
      * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16 16
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17 17
      * GNU General Public License for more details.
    
    18
    - * 
    
    18
    + *
    
    19 19
      * You should have received a copy of the GNU General Public
    
    20 20
      * License along with this program.  If not, see
    
    21 21
      * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    22 22
      * #L%
    
    23 23
      */
    
    24 24
     
    
    25
    -import fr.ird.observe.spi.DtoModelHelper;
    
    26 25
     import fr.ird.observe.client.ObserveSwingApplicationContext;
    
    27 26
     import fr.ird.observe.client.db.ClientDataContext;
    
    28 27
     import fr.ird.observe.client.db.ObserveSwingDataSource;
    
    ... ... @@ -43,7 +42,6 @@ import fr.ird.observe.client.ui.tree.navigation.nodes.seine.RoutesSeineNavigatio
    43 42
     import fr.ird.observe.client.ui.tree.navigation.nodes.seine.SetSeineNavigationTreeNode;
    
    44 43
     import fr.ird.observe.client.ui.tree.navigation.nodes.seine.TripSeineNavigationTreeNode;
    
    45 44
     import fr.ird.observe.dto.IdDto;
    
    46
    -import fr.ird.observe.dto.referential.ReferentialLocale;
    
    47 45
     import fr.ird.observe.dto.data.longline.ActivityLonglineDto;
    
    48 46
     import fr.ird.observe.dto.data.longline.ActivityLonglineReference;
    
    49 47
     import fr.ird.observe.dto.data.longline.SetLonglineDto;
    
    ... ... @@ -63,12 +61,13 @@ import fr.ird.observe.dto.data.seine.TripSeineReference;
    63 61
     import fr.ird.observe.dto.referential.ProgramDto;
    
    64 62
     import fr.ird.observe.dto.referential.ProgramHelper;
    
    65 63
     import fr.ird.observe.dto.referential.ProgramReference;
    
    66
    -import java.util.ArrayList;
    
    67
    -import java.util.Collections;
    
    68
    -import java.util.Enumeration;
    
    69
    -import java.util.List;
    
    70
    -import java.util.Objects;
    
    71
    -import java.util.Set;
    
    64
    +import fr.ird.observe.dto.referential.ReferentialLocale;
    
    65
    +import fr.ird.observe.spi.DtoModelHelper;
    
    66
    +import org.apache.commons.collections4.CollectionUtils;
    
    67
    +import org.apache.commons.logging.Log;
    
    68
    +import org.apache.commons.logging.LogFactory;
    
    69
    +import org.jdesktop.swingx.JXTree;
    
    70
    +
    
    72 71
     import javax.swing.SwingUtilities;
    
    73 72
     import javax.swing.event.TreeExpansionEvent;
    
    74 73
     import javax.swing.event.TreeWillExpandListener;
    
    ... ... @@ -76,10 +75,12 @@ import javax.swing.tree.DefaultTreeSelectionModel;
    76 75
     import javax.swing.tree.ExpandVetoException;
    
    77 76
     import javax.swing.tree.TreePath;
    
    78 77
     import javax.swing.tree.TreeSelectionModel;
    
    79
    -import org.apache.commons.collections4.CollectionUtils;
    
    80
    -import org.apache.commons.logging.Log;
    
    81
    -import org.apache.commons.logging.LogFactory;
    
    82
    -import org.jdesktop.swingx.JXTree;
    
    78
    +import java.util.ArrayList;
    
    79
    +import java.util.Collections;
    
    80
    +import java.util.Enumeration;
    
    81
    +import java.util.List;
    
    82
    +import java.util.Objects;
    
    83
    +import java.util.Set;
    
    83 84
     
    
    84 85
     /**
    
    85 86
      * Created on 14/11/16.
    
    ... ... @@ -112,7 +113,7 @@ public class NavigationTree extends JXTree {
    112 113
             addTreeWillExpandListener(new TreeWillExpandListener() {
    
    113 114
     
    
    114 115
                 @Override
    
    115
    -            public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
    
    116
    +            public void treeWillExpand(TreeExpansionEvent event) {
    
    116 117
                     if (!(getModel() instanceof NavigationTreeModel)) {
    
    117 118
                         return;
    
    118 119
                     }
    
    ... ... @@ -357,6 +358,7 @@ public class NavigationTree extends JXTree {
    357 358
             getTreeModel().nodeChanged(node);
    
    358 359
             if (deep) {
    
    359 360
                 // repaint childs nodes
    
    361
    +            @SuppressWarnings("unchecked")
    
    360 362
                 Enumeration<NavigationTreeNodeSupport<?>> e = node.children();
    
    361 363
                 while (e.hasMoreElements()) {
    
    362 364
                     NavigationTreeNodeSupport<?> child = e.nextElement();
    
    ... ... @@ -397,31 +399,22 @@ public class NavigationTree extends JXTree {
    397 399
             // noeud en mode creation
    
    398 400
             NavigationTreeNodeSupport result;
    
    399 401
     
    
    400
    -        //FIXME Create empty reference
    
    401 402
             if (TripSeineDto.class.equals(type)) {
    
    402
    -//            result = new TripSeineNavigationTreeNode(new TripSeineReference(null, null, null, 0, null, null));
    
    403
    -            result = null;
    
    403
    +            result = new TripSeineNavigationTreeNode(new TripSeineReference(new TripSeineDto(), null, null, parentNode.getId(), 0, null, null));
    
    404 404
             } else if (RouteDto.class.equals(type)) {
    
    405
    -//            result = new RouteSeineNavigationTreeNode(new RouteReference(null, null));
    
    406
    -            result = null;
    
    405
    +            result = new RouteSeineNavigationTreeNode(new RouteReference(new RouteDto(), null, null));
    
    407 406
             } else if (ActivitySeineDto.class.equals(type)) {
    
    408
    -//            result = new ActivitySeineNavigationTreeNode(new ActivitySeineReference(null, null, null, null));
    
    409
    -            result = null;
    
    407
    +            result = new ActivitySeineNavigationTreeNode(new ActivitySeineReference(new ActivitySeineDto(), null, null, null, null));
    
    410 408
             } else if (SetSeineDto.class.equals(type)) {
    
    411
    -//            result = new SetSeineNavigationTreeNode(new SetSeineReference(null));
    
    412
    -            result = null;
    
    409
    +            result = new SetSeineNavigationTreeNode(new SetSeineReference(new SetSeineDto(), null));
    
    413 410
             } else if (FloatingObjectDto.class.equals(type)) {
    
    414
    -//            result = new FloatingObjectSeineNavigationTreeNode(new FloatingObjectReference(null));
    
    415
    -            result = null;
    
    411
    +            result = new FloatingObjectSeineNavigationTreeNode(new FloatingObjectReference(new FloatingObjectDto(), null));
    
    416 412
             } else if (TripLonglineDto.class.equals(type)) {
    
    417
    -//            result = new TripLonglineNavigationTreeNode(new TripLonglineReference(null, null, null, null, 0, null, null));
    
    418
    -            result = null;
    
    413
    +            result = new TripLonglineNavigationTreeNode(new TripLonglineReference(new TripLonglineDto(), null, null, parentNode.getId(), null, 0, null, null));
    
    419 414
             } else if (ActivityLonglineDto.class.equals(type)) {
    
    420
    -//            result = new ActivityLonglineNavigationTreeNode(new ActivityLonglineReference(null, null, null, null));
    
    421
    -            result = null;
    
    415
    +            result = new ActivityLonglineNavigationTreeNode(new ActivityLonglineReference(new ActivityLonglineDto(), null, null, null, null));
    
    422 416
             } else if (SetLonglineDto.class.equals(type)) {
    
    423
    -//            result = new SetLonglineNavigationTreeNode(new SetLonglineReference(null));
    
    424
    -            result = null;
    
    417
    +            result = new SetLonglineNavigationTreeNode(new SetLonglineReference(new SetLonglineDto(), null));
    
    425 418
             } else {
    
    426 419
                 throw new IllegalStateException("Can't use type to create unsaved node: " + type.getName());
    
    427 420
             }
    

  • pom.xml
    ... ... @@ -152,7 +152,7 @@
    152 152
         <maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
    
    153 153
         <buildDate>${maven.build.timestamp}</buildDate>
    
    154 154
     
    
    155
    -    <observeToolkitVersion>1.4</observeToolkitVersion>
    
    155
    +    <observeToolkitVersion>1.5-SNAPSHOT</observeToolkitVersion>
    
    156 156
         <eugenePluginVersion>3.0-alpha-13</eugenePluginVersion>
    
    157 157
         <processorPluginVersion>1.3</processorPluginVersion>
    
    158 158