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

Commits:

8 changed files:

Changes:

  • client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/SampleUI.jaxx
    ... ... @@ -117,6 +117,14 @@
    117 117
                     </JPanel>
    
    118 118
                 </cell>
    
    119 119
             </row>
    
    120
    +        <row>
    
    121
    +          <cell>
    
    122
    +            <JLabel id='sizeMeasureMethodLabel'/>
    
    123
    +          </cell>
    
    124
    +          <cell weightx='0.5' anchor='east'>
    
    125
    +            <FilterableComboBox id='sizeMeasureMethod' genericType='SizeMeasureMethodReference'/>
    
    126
    +          </cell>
    
    127
    +        </row>
    
    120 128
             <row>
    
    121 129
                 <cell>
    
    122 130
                     <JLabel id='weightMeasureMethodLabel'/>
    
    ... ... @@ -125,6 +133,7 @@
    125 133
                     <FilterableComboBox id='weightMeasureMethod' genericType='WeightMeasureMethodReference'/>
    
    126 134
                 </cell>
    
    127 135
             </row>
    
    136
    +
    
    128 137
             <row>
    
    129 138
                 <cell>
    
    130 139
                     <JLabel id='sexLabel'/>
    

  • client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/SampleUI.jcss
    ... ... @@ -27,6 +27,10 @@
    27 27
       disabledIcon:{getStates().getSourceInformationIcon(tableEditBean.isIsLengthComputed())};
    
    28 28
     }
    
    29 29
     
    
    30
    +#sizeMeasureMethod {
    
    31
    +  enabled: {tableEditBean.getLength() != null && !tableEditBean.isIsLengthComputed()};
    
    32
    +}
    
    33
    +
    
    30 34
     #weightSourceInformation {
    
    31 35
       enabled: {tableEditBean.getAcquisitionMode() == 1 && tableEditBean.isIsWeightComputed()};
    
    32 36
       toolTipText:{getStates().getWeightDataTip(tableEditBean.isIsWeightComputed())};
    

  • toolkit/api/src/main/java/fr/ird/observe/dto/BusinessDto.java
    ... ... @@ -34,9 +34,7 @@ import java.util.Collection;
    34 34
     import java.util.Date;
    
    35 35
     import java.util.Objects;
    
    36 36
     import java.util.Optional;
    
    37
    -import java.util.function.Consumer;
    
    38 37
     import java.util.function.Predicate;
    
    39
    -import java.util.function.Supplier;
    
    40 38
     
    
    41 39
     /**
    
    42 40
      * Created on 21/07/2021.
    

  • toolkit/api/src/main/java/fr/ird/observe/dto/IdDto.java
    ... ... @@ -128,7 +128,7 @@ public abstract class IdDto extends AbstractJavaBean implements ObserveDto, DtoR
    128 128
         public void autoTrim() {
    
    129 129
         }
    
    130 130
     
    
    131
    -    protected void autoTrim(Supplier<String> getter, Consumer<String> setter) {
    
    131
    +    public static void autoTrim(Supplier<String> getter, Consumer<String> setter) {
    
    132 132
             String stringValue = getter.get();
    
    133 133
             if (stringValue != null) {
    
    134 134
                 String stringTrimmedValue = stringValue.trim();
    

  • toolkit/api/src/main/java/fr/ird/observe/dto/data/ContainerDto.java
    ... ... @@ -81,4 +81,9 @@ public abstract class ContainerDto<C extends ContainerChildDto> extends DataDto
    81 81
             firePropertyChange(PROPERTY_CHILDREN, oldValue, children);
    
    82 82
         }
    
    83 83
     
    
    84
    +    @Override
    
    85
    +    public void autoTrim() {
    
    86
    +        super.autoTrim();
    
    87
    +        WithSimpleComment.super.autoTrim();
    
    88
    +    }
    
    84 89
     }

  • toolkit/api/src/main/java/fr/ird/observe/dto/data/EditableDto.java
    ... ... @@ -55,6 +55,6 @@ public abstract class EditableDto extends DataDto implements WithSimpleComment {
    55 55
         @Override
    
    56 56
         public void autoTrim() {
    
    57 57
             super.autoTrim();
    
    58
    -        autoTrim(this::getComment, this::setComment);
    
    58
    +        WithSimpleComment.super.autoTrim();
    
    59 59
         }
    
    60 60
     }

  • toolkit/api/src/main/java/fr/ird/observe/dto/data/SimpleDto.java
    ... ... @@ -46,4 +46,9 @@ public abstract class SimpleDto extends DataDto implements WithSimpleComment {
    46 46
             firePropertyChange(PROPERTY_COMMENT, oldValue, comment);
    
    47 47
         }
    
    48 48
     
    
    49
    +    @Override
    
    50
    +    public void autoTrim() {
    
    51
    +        super.autoTrim();
    
    52
    +        WithSimpleComment.super.autoTrim();
    
    53
    +    }
    
    49 54
     }

  • toolkit/api/src/main/java/fr/ird/observe/dto/data/WithSimpleComment.java
    ... ... @@ -22,6 +22,7 @@ package fr.ird.observe.dto.data;
    22 22
      * #L%
    
    23 23
      */
    
    24 24
     
    
    25
    +import fr.ird.observe.dto.IdDto;
    
    25 26
     import fr.ird.observe.dto.ObserveDto;
    
    26 27
     import io.ultreia.java4all.bean.JavaBean;
    
    27 28
     
    
    ... ... @@ -37,4 +38,8 @@ public interface WithSimpleComment extends JavaBean, ObserveDto {
    37 38
     
    
    38 39
         void setComment(String comment);
    
    39 40
     
    
    41
    +    default void autoTrim() {
    
    42
    +        IdDto.autoTrim(this::getComment, this::setComment);
    
    43
    +    }
    
    44
    +
    
    40 45
     }