Author: kmorin Date: 2013-03-08 15:37:49 +0100 (Fri, 08 Mar 2013) New Revision: 564 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/564 Log: fixes #2093 [CAPTURE] - Comportement de l'onglet "R?\195?\169sum?\195?\169" ?\195?\160 l'?\195?\169l?\195?\169vation des poids Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java 2013-03-07 15:36:14 UTC (rev 563) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java 2013-03-08 14:37:49 UTC (rev 564) @@ -153,14 +153,14 @@ if (inertWeight != null) { totalSortedWeight += inertWeight.floatValue(); } else { - model.setSpeciesTotalInertWeight(0f); + model.setSpeciesTotalInertComputedWeight(0f); } Number livingNotItemizedWeight = model.getSpeciesTotalLivingNotItemizedWeight(); if (livingNotItemizedWeight != null) { totalSortedWeight += livingNotItemizedWeight.floatValue(); } else { - model.setSpeciesTotalLivingNotItemizedWeight(0f); + model.setSpeciesTotalLivingNotItemizedComputedWeight(0f); } model.setSpeciesTotalSampleSortedComputedWeight(totalSortedWeight); Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIHandler.java 2013-03-07 15:36:14 UTC (rev 563) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIHandler.java 2013-03-08 14:37:49 UTC (rev 564) @@ -138,7 +138,9 @@ EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_COMPUTED_WEIGHT, EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_SORTED_COMPUTED_WEIGHT, EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_UNSORTED_COMPUTED_WEIGHT, - EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_SAMPLE_SORTED_COMPUTED_WEIGHT + EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_SAMPLE_SORTED_COMPUTED_WEIGHT, + EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_INERT_COMPUTED_WEIGHT, + EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_LIVING_NOT_ITEMIZED_COMPUTED_WEIGHT )); return result; } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIModel.java 2013-03-07 15:36:14 UTC (rev 563) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIModel.java 2013-03-08 14:37:49 UTC (rev 564) @@ -78,8 +78,12 @@ public static final String PROPERTY_SPECIES_TOTAL_INERT_WEIGHT = "speciesTotalInertWeight"; + public static final String PROPERTY_SPECIES_TOTAL_INERT_COMPUTED_WEIGHT = "speciesTotalInerComputedtWeight"; + public static final String PROPERTY_SPECIES_TOTAL_LIVING_NOT_ITEMIZED_WEIGHT = "speciesTotalLivingNotItemizedWeight"; + public static final String PROPERTY_SPECIES_TOTAL_LIVING_NOT_ITEMIZED_COMPUTED_WEIGHT = "speciesTotalLivingNotItemizedComputedWeight"; + public static final String PROPERTY_BENTHOS_TOTAL_WEIGHT = "benthosTotalWeight"; public static final String PROPERTY_BENTHOS_TOTAL_SORTED_WEIGHT = "benthosTotalSortedWeight"; @@ -110,9 +114,9 @@ protected Float speciesTotalSampleSortedComputedWeight; - protected Float speciesTotalInertWeight = 0f; + protected TuttiComputedOrNotData<Float> speciesTotalInertComputedOrNotWeight = new TuttiComputedOrNotData<Float>(); - protected Float speciesTotalLivingNotItemizedWeight = 0f; + protected TuttiComputedOrNotData<Float> speciesTotalLivingNotItemizedComputedOrNotWeight = new TuttiComputedOrNotData<Float>(); protected Float benthosTotalWeight; @@ -346,26 +350,54 @@ firePropertyChange(PROPERTY_SPECIES_TOTAL_UNSORTED_COMPUTED_WEIGHT, oldValue, speciesTotalUnsortedComputedWeight); } + public TuttiComputedOrNotData<Float> getSpeciesTotalInertComputedOrNotWeight() { + return speciesTotalInertComputedOrNotWeight; + } + public Float getSpeciesTotalInertWeight() { - return speciesTotalInertWeight; + return speciesTotalInertComputedOrNotWeight.getData(); } public void setSpeciesTotalInertWeight(Float speciesTotalInertWeight) { Object oldValue = getSpeciesTotalInertWeight(); - this.speciesTotalInertWeight = speciesTotalInertWeight; + this.speciesTotalInertComputedOrNotWeight.setData(speciesTotalInertWeight); firePropertyChange(PROPERTY_SPECIES_TOTAL_INERT_WEIGHT, oldValue, speciesTotalInertWeight); } + public Float getSpeciesTotalInertComputedWeight() { + return speciesTotalInertComputedOrNotWeight.getComputedData(); + } + + public void setSpeciesTotalInertComputedWeight(Float speciesTotalInertComputedWeight) { + Object oldValue = getSpeciesTotalInertComputedWeight(); + this.speciesTotalInertComputedOrNotWeight.setComputedData(speciesTotalInertComputedWeight); + firePropertyChange(PROPERTY_SPECIES_TOTAL_INERT_COMPUTED_WEIGHT, oldValue, speciesTotalInertComputedWeight); + } + + public TuttiComputedOrNotData<Float> getSpeciesTotalLivingNotItemizedComputedOrNotWeight() { + return speciesTotalLivingNotItemizedComputedOrNotWeight; + } + public Float getSpeciesTotalLivingNotItemizedWeight() { - return speciesTotalLivingNotItemizedWeight; + return speciesTotalLivingNotItemizedComputedOrNotWeight.getData(); } public void setSpeciesTotalLivingNotItemizedWeight(Float speciesTotalLivingNotItemizedWeight) { - Object oldValue = getSpeciesTotalLivingNotItemizedWeight(); - this.speciesTotalLivingNotItemizedWeight = speciesTotalLivingNotItemizedWeight; + Object oldValue = getSpeciesTotalLivingNotItemizedComputedWeight(); + this.speciesTotalLivingNotItemizedComputedOrNotWeight.setData(speciesTotalLivingNotItemizedWeight); firePropertyChange(PROPERTY_SPECIES_TOTAL_LIVING_NOT_ITEMIZED_WEIGHT, oldValue, speciesTotalLivingNotItemizedWeight); } + public Float getSpeciesTotalLivingNotItemizedComputedWeight() { + return speciesTotalLivingNotItemizedComputedOrNotWeight.getComputedData(); + } + + public void setSpeciesTotalLivingNotItemizedComputedWeight(Float speciesTotalLivingNotItemizedComputedWeight) { + Object oldValue = getSpeciesTotalLivingNotItemizedComputedWeight(); + this.speciesTotalLivingNotItemizedComputedOrNotWeight.setComputedData(speciesTotalLivingNotItemizedComputedWeight); + firePropertyChange(PROPERTY_SPECIES_TOTAL_LIVING_NOT_ITEMIZED_COMPUTED_WEIGHT, oldValue, speciesTotalLivingNotItemizedComputedWeight); + } + public Float getBenthosTotalWeight() { return benthosTotalWeight; } @@ -476,6 +508,8 @@ } public void reset() { + setSpeciesTotalInertComputedWeight(null); + setSpeciesTotalLivingNotItemizedComputedWeight(null); setSpeciesTotalSampleSortedComputedWeight(null); setSpeciesTotalSortedComputedWeight(null); setSpeciesTotalUnsortedComputedWeight(null); Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css 2013-03-07 15:36:14 UTC (rev 563) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css 2013-03-08 14:37:49 UTC (rev 564) @@ -87,9 +87,8 @@ } #speciesTotalInertWeightField { - property: speciesTotalInertWeight; + bean: {model.getSpeciesTotalInertComputedOrNotWeight()}; model: {model.getSpeciesTotalInertWeight()}; - showReset: false; } #speciesTotalLivingNotItemizedWeightLabel { @@ -98,9 +97,8 @@ } #speciesTotalLivingNotItemizedWeightField { - property: speciesTotalLivingNotItemizedWeight; + bean: {model.getSpeciesTotalLivingNotItemizedComputedOrNotWeight()}; model: {model.getSpeciesTotalLivingNotItemizedWeight()}; - showReset: false; } #tablePopup { Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx 2013-03-07 15:36:14 UTC (rev 563) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx 2013-03-08 14:37:49 UTC (rev 564) @@ -125,15 +125,15 @@ <JLabel id='speciesTotalInertWeightLabel'/> </cell> <cell> - <NumberEditor id='speciesTotalInertWeightField' - constructorParams='this'/> + <TuttiComputedOrNotDataEditor id='speciesTotalInertWeightField' + constructorParams='this'/> </cell> <cell> <JLabel id='speciesTotalLivingNotItemizedWeightLabel'/> </cell> <cell> - <NumberEditor id='speciesTotalLivingNotItemizedWeightField' - constructorParams='this'/> + <TuttiComputedOrNotDataEditor id='speciesTotalLivingNotItemizedWeightField' + constructorParams='this'/> </cell> </row> Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java 2013-03-07 15:36:14 UTC (rev 563) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java 2013-03-08 14:37:49 UTC (rev 564) @@ -203,6 +203,10 @@ catchesUIModel.setSpeciesTotalSampleSortedComputedWeight(speciesTotalSampleSortedComputedWeight); } + public TuttiComputedOrNotData<Float> getSpeciesTotalInertComputedOrNotWeight() { + return catchesUIModel.getSpeciesTotalInertComputedOrNotWeight(); + } + public Float getSpeciesTotalInertWeight() { return catchesUIModel.getSpeciesTotalInertWeight(); } @@ -211,6 +215,18 @@ catchesUIModel.setSpeciesTotalInertWeight(speciesTotalInertWeight); } + public Float getSpeciesTotalInertComputedWeight() { + return catchesUIModel.getSpeciesTotalInertComputedWeight(); + } + + public void setSpeciesTotalInertComputedWeight(Float speciesTotalInertComputedWeight) { + catchesUIModel.setSpeciesTotalInertComputedWeight(speciesTotalInertComputedWeight); + } + + public TuttiComputedOrNotData<Float> getSpeciesTotalLivingNotItemizedComputedOrNotWeight() { + return catchesUIModel.getSpeciesTotalLivingNotItemizedComputedOrNotWeight(); + } + public Float getSpeciesTotalLivingNotItemizedWeight() { return catchesUIModel.getSpeciesTotalLivingNotItemizedWeight(); } @@ -219,6 +235,14 @@ catchesUIModel.setSpeciesTotalLivingNotItemizedWeight(speciesTotalLivingNotItemizedWeight); } + public Float getSpeciesTotalLivingNotItemizedComputedWeight() { + return catchesUIModel.getSpeciesTotalLivingNotItemizedComputedWeight(); + } + + public void setSpeciesTotalLivingNotItemizedComputedWeight(Float speciesTotalLivingNotItemizedComputedWeight) { + catchesUIModel.setSpeciesTotalLivingNotItemizedComputedWeight(speciesTotalLivingNotItemizedComputedWeight); + } + public List<SampleCategoryType> getSamplingOrder() { return samplingOrder; }
participants (1)
-
kmorin@users.forge.codelutin.com