This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 6898c9a2e8822d4a493c763003f8c983c145ebfc Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Feb 10 16:08:50 2015 +0100 fixes #6630 (ajout d'une nouvelle couleur pour les macro-déchets + changement des libellés fixes #6636 Report des actions et suppression de l'ancien code --- .../operation/FishingOperationsUIHandler.java | 2 +- .../operation/catches/EditCatchesSvgHandler.java | 119 ++-- .../content/operation/catches/EditCatchesUI.css | 241 ------- .../content/operation/catches/EditCatchesUI.jaxx | 198 +----- .../operation/catches/EditCatchesUIHandler.java | 757 +-------------------- tutti-ui-swing/src/main/resources/EcranResume.svg | 74 +- 6 files changed, 127 insertions(+), 1264 deletions(-) diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUIHandler.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUIHandler.java index 6c234c2..e11bf60 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUIHandler.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUIHandler.java @@ -174,7 +174,7 @@ public class FishingOperationsUIHandler extends AbstractTuttiTabContainerUIHandl efoUI.getGearUseFeatureTabPane().setTitle(fishingOperationText); EditCatchesUI ecUI = getUI().getCatchesTabContent(); - ecUI.getSvgTabPane().setTitle(fishingOperationText); + ecUI.getCatchesCaracteristicsTabPane().setTitle(fishingOperationText); ecUI.getSpeciesTabFishingOperationReminderLabel().setTitle(fishingOperationText); ecUI.getBenthosTabFishingOperationReminderLabel().setTitle(fishingOperationText); ecUI.getMarineLitterTabFishingOperationReminderLabel().setTitle(fishingOperationText); diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesSvgHandler.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesSvgHandler.java index e31ce1f..2ca0c10 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesSvgHandler.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesSvgHandler.java @@ -94,31 +94,6 @@ public class EditCatchesSvgHandler { } - { - n("tutti.editCatchBatch.field.speciesDistinctSortedSpeciesCount"); - n("tutti.editCatchBatch.field.benthosDistinctSortedSpeciesCount"); - - } - - - public void clearSVG() { - for (String property : svgRelatedPropertyChangeListeners.keySet()) { - for (PropertyChangeListener listener : svgRelatedPropertyChangeListeners.get(property)) { - if (property != null) { - model.removePropertyChangeListener(property, listener); - } else { - model.removePropertyChangeListener(listener); - } - } - } - svgRelatedPropertyChangeListeners.clear(); - - if (canvas != null) { - canvas.dispose(); - ui.getSvgCanvasPanel().remove(canvas); - } - } - public void initResumeSvg() { try { String parser = XMLResourceDescriptor.getXMLParserClassName(); @@ -139,6 +114,7 @@ public class EditCatchesSvgHandler { final Color catchColor = config.getColorCatch(); final Color speciesColor = config.getColorSpecies(); final Color benthosColor = config.getColorBenthos(); + final Color marineLitterColor = config.getColorMarineLitter(); canvas.addGVTTreeRendererListener(new GVTTreeRendererAdapter() { @Override @@ -151,37 +127,49 @@ public class EditCatchesSvgHandler { WeightUnit benthosWeightUnit = config.getBenthosWeightUnit(); WeightUnit marineLitterWeightUnit = config.getMarineLitterWeightUnit(); - initSvgField(CatchBatch.PROPERTY_CATCH_TOTAL_WEIGHT, + initSvgField(n("tutti.editCatchBatch.field.catchTotalWeight"), + CatchBatch.PROPERTY_CATCH_TOTAL_WEIGHT, CatchBatch.PROPERTY_CATCH_TOTAL_COMPUTED_WEIGHT, model.getCatchTotalComputedOrNotWeight(), catchWeightUnit, catchColor); - initSvgField(CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_COMPUTED_WEIGHT, catchWeightUnit, catchColor); - initSvgField(CatchBatch.PROPERTY_CATCH_TOTAL_REJECTED_WEIGHT, + initSvgField(n("tutti.editCatchBatch.field.catchTotalSortedComputedWeight"), + CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_COMPUTED_WEIGHT, catchWeightUnit, catchColor); + + initSvgField(n("tutti.editCatchBatch.field.catchTotalRejectedWeight"), + CatchBatch.PROPERTY_CATCH_TOTAL_REJECTED_WEIGHT, CatchBatch.PROPERTY_CATCH_TOTAL_REJECTED_COMPUTED_WEIGHT, model.getCatchTotalRejectedComputedOrNotWeight(), catchWeightUnit, catchColor); - initSvgField(CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_SORTED_COMPUTED_WEIGHT, catchWeightUnit, catchColor); + initSvgField(n("tutti.editCatchBatch.field.catchTotalSortedSortedComputedWeight"), + CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_SORTED_COMPUTED_WEIGHT, catchWeightUnit, catchColor); - initSvgField(CatchBatch.PROPERTY_SPECIES_TOTAL_SORTED_WEIGHT, + initSvgField(n("tutti.editCatchBatch.field.speciesTotalSortedWeight"), + CatchBatch.PROPERTY_SPECIES_TOTAL_SORTED_WEIGHT, CatchBatch.PROPERTY_SPECIES_TOTAL_SORTED_COMPUTED_WEIGHT, model.getSpeciesTotalSortedComputedOrNotWeight(), speciesWeightUnit, speciesColor); - initSvgField(CatchBatch.PROPERTY_SPECIES_TOTAL_SAMPLE_SORTED_COMPUTED_WEIGHT, speciesWeightUnit, speciesColor); + initSvgField(n("tutti.editCatchBatch.field.speciesTotalSampleSortedComputedWeight"), + CatchBatch.PROPERTY_SPECIES_TOTAL_SAMPLE_SORTED_COMPUTED_WEIGHT, speciesWeightUnit, speciesColor); - initSvgField(CatchBatch.PROPERTY_BENTHOS_TOTAL_SORTED_WEIGHT, + initSvgField(n("tutti.editCatchBatch.field.benthosTotalSortedWeight"), + CatchBatch.PROPERTY_BENTHOS_TOTAL_SORTED_WEIGHT, CatchBatch.PROPERTY_BENTHOS_TOTAL_SORTED_COMPUTED_WEIGHT, model.getBenthosTotalSortedComputedOrNotWeight(), benthosWeightUnit, benthosColor); - initSvgField(CatchBatch.PROPERTY_BENTHOS_TOTAL_SAMPLE_SORTED_COMPUTED_WEIGHT, benthosWeightUnit, benthosColor); + initSvgField(n("tutti.editCatchBatch.field.benthosTotalSampleSortedComputedWeight"), + CatchBatch.PROPERTY_BENTHOS_TOTAL_SAMPLE_SORTED_COMPUTED_WEIGHT, benthosWeightUnit, benthosColor); - initSvgField(CatchBatch.PROPERTY_CATCH_TOTAL_UNSORTED_COMPUTED_WEIGHT, catchWeightUnit, catchColor); - initSvgField(CatchBatch.PROPERTY_SPECIES_TOTAL_UNSORTED_COMPUTED_WEIGHT, speciesWeightUnit, speciesColor); - initSvgField(CatchBatch.PROPERTY_BENTHOS_TOTAL_UNSORTED_COMPUTED_WEIGHT, benthosWeightUnit, benthosColor); + initSvgField(n("tutti.editCatchBatch.field.catchTotalUnsortedComputedWeight"), + CatchBatch.PROPERTY_CATCH_TOTAL_UNSORTED_COMPUTED_WEIGHT, catchWeightUnit, catchColor); + initSvgField(n("tutti.editCatchBatch.field.speciesTotalUnsortedComputedWeight"), + CatchBatch.PROPERTY_SPECIES_TOTAL_UNSORTED_COMPUTED_WEIGHT, speciesWeightUnit, speciesColor); + initSvgField(n("tutti.editCatchBatch.field.benthosTotalUnsortedComputedWeight"), + CatchBatch.PROPERTY_BENTHOS_TOTAL_UNSORTED_COMPUTED_WEIGHT, benthosWeightUnit, benthosColor); addSvgRelatedPropertyChangeListener(null, new ChangeElementBackgroundColorPropertyChangeListener( CatchBatch.PROPERTY_SPECIES_TOTAL_UNSORTED_COMPUTED_WEIGHT, @@ -213,21 +201,24 @@ public class EditCatchesSvgHandler { } })); - initSvgField(CatchBatch.PROPERTY_SPECIES_TOTAL_COMPUTED_WEIGHT, + initSvgField(n("tutti.editCatchBatch.field.speciesTotalComputedWeight"), + CatchBatch.PROPERTY_SPECIES_TOTAL_COMPUTED_WEIGHT, speciesWeightUnit, speciesColor, CatchBatch.PROPERTY_BENTHOS_TOTAL_COMPUTED_WEIGHT, CatchBatch.PROPERTY_MARINE_LITTER_TOTAL_WEIGHT); - initSvgField(CatchBatch.PROPERTY_BENTHOS_TOTAL_COMPUTED_WEIGHT, + initSvgField(n("tutti.editCatchBatch.field.benthosTotalComputedWeight"), + CatchBatch.PROPERTY_BENTHOS_TOTAL_COMPUTED_WEIGHT, benthosWeightUnit, benthosColor, CatchBatch.PROPERTY_SPECIES_TOTAL_COMPUTED_WEIGHT, CatchBatch.PROPERTY_MARINE_LITTER_TOTAL_WEIGHT); - initSvgField(CatchBatch.PROPERTY_MARINE_LITTER_TOTAL_WEIGHT, + initSvgField(n("tutti.editCatchBatch.field.marineLitterTotalWeight"), + CatchBatch.PROPERTY_MARINE_LITTER_TOTAL_WEIGHT, CatchBatch.PROPERTY_MARINE_LITTER_TOTAL_COMPUTED_WEIGHT, model.getMarineLitterTotalComputedOrNotWeight(), marineLitterWeightUnit, - catchColor, + marineLitterColor, CatchBatch.PROPERTY_SPECIES_TOTAL_COMPUTED_WEIGHT, CatchBatch.PROPERTY_BENTHOS_TOTAL_COMPUTED_WEIGHT); @@ -244,11 +235,15 @@ public class EditCatchesSvgHandler { CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_COMPUTED_WEIGHT, CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_COMPUTED_WEIGHT)); - initSpeciesCount(CatchBatch.PROPERTY_SPECIES_DISTINCT_SORTED_SPECIES_COUNT); - initSpeciesCount(CatchBatch.PROPERTY_BENTHOS_DISTINCT_SORTED_SPECIES_COUNT); + initSpeciesCount(n("tutti.editCatchBatch.field.speciesDistinctSortedSpeciesCount"), + CatchBatch.PROPERTY_SPECIES_DISTINCT_SORTED_SPECIES_COUNT); + initSpeciesCount(n("tutti.editCatchBatch.field.benthosDistinctSortedSpeciesCount"), + CatchBatch.PROPERTY_BENTHOS_DISTINCT_SORTED_SPECIES_COUNT); - initTremieCarrouselField(CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_CAROUSSEL_WEIGHT, catchWeightUnit); - initTremieCarrouselField(CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_TREMIS_WEIGHT, catchWeightUnit); + initTremieCarrouselField(n("tutti.editCatchBatch.field.catchTotalSortedCarousselWeight"), + CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_CAROUSSEL_WEIGHT, catchWeightUnit); + initTremieCarrouselField(n("tutti.editCatchBatch.field.catchTotalSortedTremisWeight"), + CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_TREMIS_WEIGHT, catchWeightUnit); ui.getSvgCanvasPanel().add(canvas, BorderLayout.CENTER); } @@ -265,11 +260,31 @@ public class EditCatchesSvgHandler { } } - protected void initSvgField(String computedProperty, WeightUnit weightUnit, Color bgColor, String... idsInGroup) { - initSvgField(null, computedProperty, null, weightUnit, bgColor, idsInGroup); + public void clearSVG() { + + for (String property : svgRelatedPropertyChangeListeners.keySet()) { + for (PropertyChangeListener listener : svgRelatedPropertyChangeListeners.get(property)) { + if (property != null) { + model.removePropertyChangeListener(property, listener); + } else { + model.removePropertyChangeListener(listener); + } + } + } + svgRelatedPropertyChangeListeners.clear(); + + if (canvas != null) { + canvas.dispose(); + ui.getSvgCanvasPanel().remove(canvas); + } + } + + protected void initSvgField(String label, String computedProperty, WeightUnit weightUnit, Color bgColor, String... idsInGroup) { + initSvgField(label, null, computedProperty, null, weightUnit, bgColor, idsInGroup); } - protected void initSvgField(String property, + protected void initSvgField(final String label, + String property, String computedProperty, final ComputableData<Float> computableData, final WeightUnit weightUnit, @@ -314,7 +329,7 @@ public class EditCatchesSvgHandler { String textColor = colorBrightness > 150 ? "#000000" : "#FFFFFF"; style.setProperty("fill", textColor, null); - labelElement.setTextContent(weightUnit.decorateLabel(t("tutti.editCatchBatch.field." + notNullProperty))); + labelElement.setTextContent(weightUnit.decorateLabel(t(label))); bbox = labelElement.getBBox(); float labelX = bbox.getX(); float width = Math.abs(x - labelX) + 10; @@ -449,7 +464,7 @@ public class EditCatchesSvgHandler { return value; } - protected void initSpeciesCount(final String property) { + protected void initSpeciesCount(final String label, final String property) { if (log.isDebugEnabled()) { log.debug("init " + property + " field"); @@ -459,7 +474,7 @@ public class EditCatchesSvgHandler { @Override public void run() { Element labelElement = svgDocument.getElementById(property + "Label"); - labelElement.setTextContent(t("tutti.editCatchBatch.field." + property)); + labelElement.setTextContent(t(label)); Element valueElement = svgDocument.getElementById(property + "Value"); Integer value; @@ -491,7 +506,7 @@ public class EditCatchesSvgHandler { }); } - protected void initTremieCarrouselField(final String property, final WeightUnit weightUnit) { + protected void initTremieCarrouselField(final String label, final String property, final WeightUnit weightUnit) { if (log.isDebugEnabled()) { log.debug("init " + property + " field"); } @@ -500,7 +515,7 @@ public class EditCatchesSvgHandler { @Override public void run() { Element labelElement = svgDocument.getElementById(property + "Label"); - labelElement.setTextContent(weightUnit.decorateLabel(t("tutti.editCatchBatch.field." + property))); + labelElement.setTextContent(weightUnit.decorateLabel(t(label))); } }); diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.css b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.css index f8369c0..dce7a59 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.css +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.css @@ -88,259 +88,18 @@ ComputableDataEditor { rightDecoration: {accidentalTabContent.getAccidentalBatchTabToolBar()}; } -#catchTable { - border: {BorderFactory.createTitledBorder(t("tutti.editCatchBatch.legend.total"))}; -} - -#catchTotalWeightLabel { - text: "tutti.editCatchBatch.field.catchTotalWeight"; - toolTipText: {"tutti.editCatchBatch.field.catchTotalWeight.tip"}; - labelFor: {catchTotalWeightField}; - _strongStyle: true; - _help: {"tutti.editCatchBatch.field.catchTotalWeight.help"}; - _addWeightUnit: {model.getCatchWeightUnit()}; -} - -#catchTotalSortedWeightPanel { - layout: {catchTotalSortedWeightPanelLayout}; -} - -#catchTotalWeightField { - bean: {model.getCatchTotalComputedOrNotWeight()}; - numberValue: {model.getCatchTotalWeight()}; - _help: {"tutti.editCatchBatch.field.catchTotalWeight.help"}; -} - -#catchTotalSortedWeightLabel { - text: "tutti.editCatchBatch.field.catchTotalSortedWeight"; - toolTipText: {"tutti.editCatchBatch.field.catchTotalSortedWeight.tip"}; - labelFor: {catchTotalSortedWeightField}; - _help: {"tutti.editCatchBatch.field.catchTotalSortedWeight.help"}; - _addWeightUnit: {model.getCatchWeightUnit()}; -} - -#catchTotalSortedWeightField { - text: {handler.getWeightStringValue(catchTotalSortedWeightLabel, model.getCatchTotalSortedComputedWeight())}; - _computed: true; - _help: {"tutti.editCatchBatch.field.catchTotalSortedWeight.help"}; -} - -#tremieCarrouselRow { - visible: {model.getFishingOperation().getVessel() != null && model.getFishingOperation().getVessel().getId().equals(handler.getConfig().getTremieCarousselVesselId())}; -} - -#catchTotalSortedTremisWeightLabel { - text: "tutti.editCatchBatch.field.catchTotalSortedTremisWeight"; - toolTipText: {"tutti.editCatchBatch.field.catchTotalSortedTremisWeight.tip"}; - labelFor: {catchTotalSortedTremisWeightField}; - _help: {"tutti.editCatchBatch.field.catchTotalSortedTremisWeight.help"}; - _addWeightUnit: {model.getCatchWeightUnit()}; -} - -#catchTotalSortedTremisWeightField { - enabled: false; - text: {handler.getWeightStringValue(catchTotalSortedTremisWeightLabel, model.getCatchTotalSortedTremisWeight())}; - _help: {"tutti.editCatchBatch.field.catchTotalSortedTremisWeight.help"}; -} - -#catchTotalSortedCarousselWeightLabel { - text: "tutti.editCatchBatch.field.catchTotalSortedCarousselWeight"; - toolTipText: {"tutti.editCatchBatch.field.catchTotalSortedCarousselWeight.tip"}; - labelFor: {catchTotalSortedCarousselWeightField}; - _help: {"tutti.editCatchBatch.field.catchTotalSortedCarousselWeight.help"}; - _addWeightUnit: {model.getCatchWeightUnit()}; -} - -#catchTotalSortedCarousselWeightField { - enabled: false; - text: {handler.getWeightStringValue(catchTotalSortedCarousselWeightLabel, model.getCatchTotalSortedCarousselWeight())}; - _help: {"tutti.editCatchBatch.field.catchTotalSortedCarousselWeight.help"}; -} - -#catchTotalRejectedWeightLabel { - text: "tutti.editCatchBatch.field.catchTotalRejectedWeight"; - toolTipText: {"tutti.editCatchBatch.field.catchTotalRejectedWeight.tip"}; - labelFor: {catchTotalRejectedWeightField}; - _help: {"tutti.editCatchBatch.field.catchTotalRejectedWeight.help"}; - _addWeightUnit: {model.getCatchWeightUnit()}; -} - -#catchTotalRejectedWeightField { - bean: {model.getCatchTotalRejectedComputedOrNotWeight()}; - numberValue: {model.getCatchTotalRejectedWeight()}; - _help: {"tutti.editCatchBatch.field.catchTotalRejectedWeight.help"}; - _validatorLabel: {t("tutti.editCatchBatch.field.catchTotalRejectedWeight")}; -} - -#catchTotalUnsortedWeightLabel { - text: "tutti.editCatchBatch.field.catchTotalUnsortedWeight"; - toolTipText: {"tutti.editCatchBatch.field.catchTotalUnsortedWeight.tip"}; - labelFor: {catchTotalUnsortedWeightField}; - _help: {"tutti.editCatchBatch.field.catchTotalUnsortedWeight.help"}; - _addWeightUnit: {model.getCatchWeightUnit()}; -} - -#catchTotalUnsortedWeightField { - text: {handler.getWeightStringValue(catchTotalUnsortedWeightLabel, model.getCatchTotalUnsortedComputedWeight())}; - _computed: true; - _help: {"tutti.editCatchBatch.field.catchTotalUnsortedWeight.help"}; -} - #speciesTabPanel { layout:{speciesTabPanelLayout}; } -#speciesTable { - border: {BorderFactory.createTitledBorder(t("tutti.editCatchBatch.legend.species"))}; -} - -#speciesTotalWeightLabel { - text: "tutti.editCatchBatch.field.speciesTotalWeight"; - toolTipText: {"tutti.editCatchBatch.field.speciesTotalWeight.tip"}; - labelFor: {speciesTotalWeightField}; - _strongStyle: true; - _help: {"tutti.editCatchBatch.field.speciesTotalWeight.help"}; - _addWeightUnit: {handler.getConfig().getSpeciesWeightUnit()}; -} - -#speciesTotalWeightField { - text: {handler.getWeightStringValueForTotalWeight(speciesTotalWeightLabel, model.getCatchTotalRejectedWeight(), model.getSpeciesTotalComputedWeight())}; - disabledTextColor: {handler.getWeightColorForTotalWeight(model.getCatchTotalRejectedWeight(), model.getSpeciesTotalComputedWeight())}; - _computed: true; - _help: {"tutti.editCatchBatch.field.speciesTotalWeight.help"}; -} - -#speciesTotalSortedWeightLabel { - text: "tutti.editCatchBatch.field.speciesTotalSortedWeight"; - toolTipText: {"tutti.editCatchBatch.field.speciesTotalSortedWeight.tip"}; - labelFor: {speciesTotalSortedWeightField}; - _help: {"tutti.editCatchBatch.field.speciesTotalSortedWeight.help"}; - _addWeightUnit: {handler.getConfig().getSpeciesWeightUnit()}; -} - -#speciesTotalSortedWeightField { - bean: {model.getSpeciesTotalSortedComputedOrNotWeight()}; - numberValue: {model.getSpeciesTotalSortedWeight()}; - _help: {"tutti.editCatchBatch.field.speciesTotalSortedWeight.help"}; -} - -#speciesTotalSampleSortedWeightLabel { - text: "tutti.editCatchBatch.field.speciesTotalSampleSortedWeight"; - toolTipText: {"tutti.editCatchBatch.field.speciesTotalSampleSortedWeight.tip"}; - labelFor: {speciesTotalSampleSortedWeightField}; - _help: {"tutti.editCatchBatch.field.speciesTotalSampleSortedWeight.help"}; - _addWeightUnit: {handler.getConfig().getSpeciesWeightUnit()}; -} - -#speciesTotalSampleSortedWeightField { - text: {handler.getWeightStringValue(speciesTotalSampleSortedWeightLabel, model.getSpeciesTotalSampleSortedComputedWeight())}; - _computed: true; - _help: {"tutti.editCatchBatch.field.speciesTotalSampleSortedWeight.help"}; -} - -#speciesTotalUnsortedWeightLabel { - text: "tutti.editCatchBatch.field.speciesTotalUnsortedWeight"; - toolTipText: {"tutti.editCatchBatch.field.speciesTotalUnsortedWeight.tip"}; - labelFor: {speciesTotalUnsortedWeightField}; - _help: {"tutti.editCatchBatch.field.speciesTotalUnsortedWeight.help"}; - _addWeightUnit: {handler.getConfig().getSpeciesWeightUnit()}; -} - -#speciesTotalUnsortedWeightField { - text: {handler.getWeightStringValue(speciesTotalUnsortedWeightLabel, model.getSpeciesTotalUnsortedComputedWeight())}; - _computed: true; - _help: {"tutti.editCatchBatch.field.speciesTotalUnsortedWeight.help"}; -} - #benthosTabPanel { layout:{benthosTabPanelLayout}; } -#benthosTable { - border: {BorderFactory.createTitledBorder(t("tutti.editCatchBatch.legend.benthos"))}; -} - -#benthosTotalWeightLabel { - text: "tutti.editCatchBatch.field.benthosTotalWeight"; - toolTipText: {"tutti.editCatchBatch.field.benthosTotalWeight.tip"}; - labelFor: {benthosTotalWeightField}; - _strongStyle: true; - _help: {"tutti.editCatchBatch.field.benthosTotalWeight.help"}; - _addWeightUnit: {handler.getConfig().getBenthosWeightUnit()}; -} - -#benthosTotalWeightField { - text: {handler.getWeightStringValueForTotalWeight(benthosTotalWeightLabel, model.getCatchTotalRejectedWeight(), model.getBenthosTotalComputedWeight())}; - disabledTextColor: {handler.getWeightColorForTotalWeight(model.getCatchTotalRejectedWeight(), model.getBenthosTotalComputedWeight())}; - _computed: true; - _help: {"tutti.editCatchBatch.field.benthosTotalWeight.help"}; -} - -#benthosTotalSortedWeightLabel { - text: "tutti.editCatchBatch.field.benthosTotalSortedWeight"; - toolTipText: {"tutti.editCatchBatch.field.benthosTotalSortedWeight.tip"}; - labelFor: {benthosTotalSortedWeightField}; - _help: {"tutti.editCatchBatch.field.benthosTotalSortedWeight.help"}; - _addWeightUnit: {handler.getConfig().getBenthosWeightUnit()}; -} - -#benthosTotalSortedWeightField { - bean: {model.getBenthosTotalSortedComputedOrNotWeight()}; - numberValue: {model.getBenthosTotalSortedWeight()}; - _help: {"tutti.editCatchBatch.field.benthosTotalSortedWeight.help"}; -} - -#benthosTotalSampleSortedWeightLabel { - text: "tutti.editCatchBatch.field.benthosTotalSampleSortedWeight"; - toolTipText: {"tutti.editCatchBatch.field.benthosTotalSampleSortedWeight.tip"}; - labelFor: {benthosTotalSampleSortedWeightField}; - _help: {"tutti.editCatchBatch.field.benthosTotalSampleSortedWeight.help"}; - _addWeightUnit: {handler.getConfig().getBenthosWeightUnit()}; -} - -#benthosTotalSampleSortedWeightField { - text: {handler.getWeightStringValue(benthosTotalSampleSortedWeightLabel, model.getBenthosTotalSampleSortedComputedWeight())}; - _computed: true; - _help: {"tutti.editCatchBatch.field.benthosTotalSampleSortedWeight.help"}; -} - -#benthosTotalUnsortedWeightLabel { - text: "tutti.editCatchBatch.field.benthosTotalUnsortedWeight"; - toolTipText: {"tutti.editCatchBatch.field.benthosTotalUnsortedWeight.tip"}; - labelFor: {benthosTotalUnsortedWeightField}; - _help: {"tutti.editCatchBatch.field.benthosTotalUnsortedWeight.help"}; - _addWeightUnit: {handler.getConfig().getBenthosWeightUnit()}; -} - -#benthosTotalUnsortedWeightField { - text: {handler.getWeightStringValue(benthosTotalUnsortedWeightLabel, model.getBenthosTotalUnsortedComputedWeight())}; - _computed: true; - _help: {"tutti.editCatchBatch.field.benthosTotalUnsortedWeight.help"}; -} - #marineLitterTabPanel { layout:{marineLitterTabPanelLayout}; } -#marineLitterTable { - border: {BorderFactory.createTitledBorder(t("tutti.editCatchBatch.legend.marineLitter"))}; -} - -#marineLitterTotalWeightLabel { - text: "tutti.editCatchBatch.field.marineLitterTotalWeight"; - toolTipText: {"tutti.editCatchBatch.field.marineLitterTotalWeight.tip"}; - labelFor: {marineLitterTotalWeightField}; - _strongStyle: true; - _help: {"tutti.editCatchBatch.field.marineLitterTotalWeight.help"}; - _addWeightUnit: {handler.getConfig().getMarineLitterWeightUnit()}; -} - -#marineLitterTotalWeightField { - bean: {model.getMarineLitterTotalComputedOrNotWeight()}; - numberValue: {model.getMarineLitterTotalWeight()}; - _help: {"tutti.editCatchBatch.field.marineLitterTotalWeight.help"}; -} - #accidentalTabPanel { layout:{accidentalTabPanelLayout}; } diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.jaxx b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.jaxx index fc1f918..b46615b 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.jaxx +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.jaxx @@ -115,206 +115,12 @@ public EditCatchesUI(FishingOperationsUI parentUI) { </JToolBar> <JTabbedPane id='tabPane' constraints='BorderLayout.CENTER'> - <tab id='svgTab'> - <JXTitledPanel id='svgTabPane'> + <tab id='catchesCaracteristicsTab'> + <JXTitledPanel id='catchesCaracteristicsTabPane'> <JPanel layout='{new BorderLayout()}' id='svgCanvasPanel'> </JPanel> </JXTitledPanel> </tab> - - <!--<tab id='catchesCaracteristicsTab'>--> - <!--<JXTitledPanel id='catchesCaracteristicsTabPane'>--> - <!--<JScrollPane id='catchesCaracteristicsTabScrollPane'>--> - <!--<JPanel layout='{new BorderLayout()}'>--> - <!--<Table id="catchesForm" fill='both' weightx='1'--> - <!--constraints='BorderLayout.NORTH'>--> - <!--<row>--> - <!--<cell>--> - <!--<Table id='catchTable' fill='both'>--> - - <!--<!– Poids total capture –>--> - <!--<row>--> - <!--<cell anchor='west'>--> - <!--<JLabel id='catchTotalWeightLabel'/>--> - <!--</cell>--> - <!--<cell columns='4' weightx='1.0'>--> - <!--<ComputableDataEditor id='catchTotalWeightField'--> - <!--genericType="Float"--> - <!--constructorParams='this'/>--> - <!--</cell>--> - <!--</row>--> - <!--<!– Poids total trié balance tremie / caroussel–>--> - <!--<row>--> - <!--<cell anchor='west'>--> - <!--<JLabel id='catchTotalSortedWeightLabel'/>--> - <!--</cell>--> - <!--<cell columns='4' weightx='1.0'>--> - <!--<JTextField id='catchTotalSortedWeightField'/>--> - <!--</cell>--> - <!--</row>--> - <!--<row>--> - <!--<cell columns='5'>--> - <!--<Table fill='both' id='tremieCarrouselRow'>--> - <!--<row>--> - <!--<cell anchor='west'>--> - <!--<JLabel--> - <!--id='catchTotalSortedCarousselWeightLabel'/>--> - <!--</cell>--> - <!--<cell weightx='1.0'>--> - <!--<JTextField--> - <!--id='catchTotalSortedCarousselWeightField'/>--> - <!--</cell>--> - <!--<cell anchor='west'>--> - <!--<JLabel id='catchTotalSortedTremisWeightLabel'/>--> - <!--</cell>--> - <!--<cell weightx='1.0'>--> - <!--<JTextField--> - <!--id='catchTotalSortedTremisWeightField'/>--> - <!--</cell>--> - <!--</row>--> - <!--</Table>--> - <!--</cell>--> - <!--</row>--> - <!--<!–Poids total hors vrac–>--> - <!--<row>--> - <!--<cell>--> - <!--<JLabel id='catchTotalUnsortedWeightLabel'/>--> - <!--</cell>--> - <!--<cell columns='4' weightx='1.0'>--> - <!--<JTextField id='catchTotalUnsortedWeightField'/>--> - <!--</cell>--> - <!--</row>--> - <!--<!– Poids total NON TRIÉ (rejeté) –>--> - <!--<row>--> - <!--<cell>--> - <!--<JLabel id='catchTotalRejectedWeightLabel'/>--> - <!--</cell>--> - <!--<cell columns='4' weightx='1.0'>--> - <!--<ComputableDataEditor genericType="Float"--> - <!--id='catchTotalRejectedWeightField'--> - <!--constructorParams='this'/>--> - <!--</cell>--> - <!--</row>--> - <!--</Table>--> - <!--</cell>--> - <!--</row>--> - <!--<row>--> - <!--<cell>--> - <!--<Table id='speciesTable' fill='both'>--> - - <!--<!– Poids total capture –>--> - <!--<row>--> - <!--<cell anchor='west'>--> - <!--<JLabel id='speciesTotalWeightLabel'/>--> - <!--</cell>--> - <!--<cell weightx='1.0'>--> - <!--<JTextField id='speciesTotalWeightField'/>--> - <!--</cell>--> - <!--</row>--> - <!--<!– Poids total vrac –>--> - <!--<row>--> - <!--<cell anchor='west'>--> - <!--<JLabel id='speciesTotalSortedWeightLabel'/>--> - <!--</cell>--> - <!--<cell weightx='1.0'>--> - <!--<ComputableDataEditor genericType="Float"--> - <!--id='speciesTotalSortedWeightField'--> - <!--constructorParams='this'/>--> - <!--</cell>--> - <!--</row>--> - - <!--<!– Poids total échantillonné vrac –>--> - <!--<row>--> - <!--<cell>--> - <!--<JLabel id='speciesTotalSampleSortedWeightLabel'/>--> - <!--</cell>--> - <!--<cell>--> - <!--<JTextField id='speciesTotalSampleSortedWeightField'/>--> - <!--</cell>--> - <!--</row>--> - <!--<!– Poids total hors vrac –>--> - <!--<row>--> - <!--<cell>--> - <!--<JLabel id='speciesTotalUnsortedWeightLabel'/>--> - <!--</cell>--> - <!--<cell>--> - <!--<JTextField id='speciesTotalUnsortedWeightField'/>--> - <!--</cell>--> - <!--</row>--> - <!--</Table>--> - <!--</cell>--> - <!--</row>--> - <!--<row>--> - <!--<cell>--> - <!--<Table id='benthosTable' fill='both'>--> - - <!--<!– Poids total capture –>--> - <!--<row>--> - <!--<cell anchor='west'>--> - <!--<JLabel id='benthosTotalWeightLabel'/>--> - <!--</cell>--> - <!--<cell weightx='1.0'>--> - <!--<JTextField id='benthosTotalWeightField'/>--> - <!--</cell>--> - <!--</row>--> - <!--<!– Poids total vrac –>--> - <!--<row>--> - <!--<cell anchor='west'>--> - <!--<JLabel id='benthosTotalSortedWeightLabel'/>--> - <!--</cell>--> - <!--<cell weightx='1.0'>--> - <!--<ComputableDataEditor genericType="Float"--> - <!--id='benthosTotalSortedWeightField'--> - <!--constructorParams='this'/>--> - <!--</cell>--> - <!--</row>--> - - <!--<!– Poids total échantillonné vrac –>--> - <!--<row>--> - <!--<cell>--> - <!--<JLabel id='benthosTotalSampleSortedWeightLabel'/>--> - <!--</cell>--> - <!--<cell>--> - <!--<JTextField id='benthosTotalSampleSortedWeightField'/>--> - <!--</cell>--> - <!--</row>--> - <!--<!– Poids total hors vrac –>--> - <!--<row>--> - <!--<cell>--> - <!--<JLabel id='benthosTotalUnsortedWeightLabel'/>--> - <!--</cell>--> - <!--<cell>--> - <!--<JTextField id='benthosTotalUnsortedWeightField'/>--> - <!--</cell>--> - <!--</row>--> - <!--</Table>--> - <!--</cell>--> - <!--</row>--> - <!--<row>--> - <!--<cell columns='2'>--> - <!--<Table id='marineLitterTable' fill='both'>--> - - <!--<!– Poids total Macro dechet –>--> - <!--<row>--> - <!--<cell anchor='west'>--> - <!--<JLabel id='marineLitterTotalWeightLabel'/>--> - <!--</cell>--> - <!--<cell weightx='1.0'>--> - <!--<ComputableDataEditor genericType="Float"--> - <!--id='marineLitterTotalWeightField'--> - <!--constructorParams='this'/>--> - <!--</cell>--> - <!--</row>--> - - - <!--</Table>--> - <!--</cell>--> - <!--</row>--> - <!--</Table>--> - <!--</JPanel>--> - <!--</JScrollPane>--> - <!--</JXTitledPanel>--> - <!--</tab>--> <tab id='speciesTab'> <JPanel id='speciesTabPanel'> <JXTitledPanel id='speciesTabFishingOperationReminderLabel' diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIHandler.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIHandler.java index e916d22..145e5d5 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIHandler.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIHandler.java @@ -22,15 +22,8 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches; * #L% */ -import com.google.common.base.Function; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; import com.google.common.collect.Sets; -import fr.ifremer.tutti.TuttiConfiguration; -import fr.ifremer.tutti.persistence.entities.data.CatchBatch; -import fr.ifremer.tutti.persistence.entities.data.FishingOperation; import fr.ifremer.tutti.persistence.entities.referential.Species; -import fr.ifremer.tutti.type.WeightUnit; import fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.BenthosBatchRowModel; import fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.frequency.BenthosFrequencyCellComponent; import fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.frequency.BenthosFrequencyUI; @@ -42,45 +35,22 @@ import fr.ifremer.tutti.ui.swing.content.operation.catches.species.split.SplitSp import fr.ifremer.tutti.ui.swing.util.AbstractTuttiTabContainerUIHandler; import fr.ifremer.tutti.ui.swing.util.TuttiBeanMonitor; import fr.ifremer.tutti.ui.swing.util.TuttiUI; -import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil; -import fr.ifremer.tutti.ui.swing.util.catches.EnterWeightUI; -import fr.ifremer.tutti.ui.swing.util.computable.ComputableData; -import fr.ifremer.tutti.util.Numbers; import fr.ifremer.tutti.util.Weights; -import jaxx.runtime.JAXXUtil; import jaxx.runtime.swing.CardLayout2Ext; import jaxx.runtime.validator.swing.SwingValidator; -import org.apache.batik.dom.svg.SAXSVGDocumentFactory; -import org.apache.batik.dom.svg.SVGOMRectElement; -import org.apache.batik.dom.svg.SVGOMTextElement; -import org.apache.batik.swing.JSVGCanvas; -import org.apache.batik.swing.gvt.GVTTreeRendererAdapter; -import org.apache.batik.swing.gvt.GVTTreeRendererEvent; -import org.apache.batik.swing.svg.SVGUserAgentAdapter; -import org.apache.batik.util.XMLResourceDescriptor; -import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.jdesktop.swingx.JXTitledPanel; import org.nuiton.jaxx.application.swing.tab.TabHandler; -import org.nuiton.util.Resource; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.events.EventListener; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.svg.SVGRect; -import org.w3c.dom.svg.SVGStylable; - -import javax.swing.*; + +import javax.swing.JComponent; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTabbedPane; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import java.awt.*; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; -import java.io.IOException; -import java.net.URL; -import java.util.Objects; import java.util.Set; import static org.nuiton.i18n.I18n.n; @@ -109,32 +79,8 @@ public class EditCatchesUIHandler extends AbstractTuttiTabContainerUIHandler<Edi public static final String CLASSIC_VESSEL = "classicVessel"; - static { - n("tutti.editCatchBatch.field.catchTotalWeight"); - n("tutti.editCatchBatch.field.catchTotalRejectedWeight"); - n("tutti.editCatchBatch.field.speciesTotalSortedWeight"); - n("tutti.editCatchBatch.field.benthosTotalSortedWeight"); - n("tutti.editCatchBatch.field.marineLitterTotalWeight"); - - n("tutti.editCatchBatch.field.catchTotalSortedComputedWeight"); - n("tutti.editCatchBatch.field.catchTotalSortedSortedComputedWeight"); - n("tutti.editCatchBatch.field.catchTotalUnsortedComputedWeight"); - n("tutti.editCatchBatch.field.speciesTotalComputedWeight"); - n("tutti.editCatchBatch.field.speciesTotalUnsortedComputedWeight"); - n("tutti.editCatchBatch.field.speciesTotalSampleSortedComputedWeight"); - n("tutti.editCatchBatch.field.benthosTotalComputedWeight"); - n("tutti.editCatchBatch.field.benthosTotalUnsortedComputedWeight"); - n("tutti.editCatchBatch.field.benthosTotalSampleSortedComputedWeight"); - - n("tutti.editCatchBatch.field.speciesDistinctSortedSpeciesCount"); - - n("tutti.editCatchBatch.field.catchTotalSortedTremisWeight"); - n("tutti.editCatchBatch.field.catchTotalSortedCarousselWeight"); - } - /** Logger. */ - private static final Log log = - LogFactory.getLog(EditCatchesUIHandler.class); + private static final Log log = LogFactory.getLog(EditCatchesUIHandler.class); /** * To monitor changes on the incoming fishing operation. @@ -165,26 +111,12 @@ public class EditCatchesUIHandler extends AbstractTuttiTabContainerUIHandler<Edi } }; - protected Multimap<String, PropertyChangeListener> svgRelatedPropertyChangeListeners = HashMultimap.create(); - - protected JSVGCanvas canvas; - - protected Document svgDocument; - - protected final SVGUserAgentAdapter ua = new SVGUserAgentAdapter() { - @Override - public void displayError(String message) { - if (log.isErrorEnabled()) { - log.error("Canvas error: " + message); - } - } - @Override - public void displayError(Exception ex) { - if (log.isErrorEnabled()) { - log.error("Canvas error", ex); - } - } - }; + /** + * To handle the svg canvas. + * + * @since 3.13 + */ + private EditCatchesSvgHandler editCatchesSvgHandler; //------------------------------------------------------------------------// //-- AbstractTuttiUIHandler methods --// @@ -210,6 +142,9 @@ public class EditCatchesUIHandler extends AbstractTuttiTabContainerUIHandler<Edi listModelIsModify(model); catchBatchMonitor.setBean(model); + + editCatchesSvgHandler = new EditCatchesSvgHandler(getContext(), ui, model); + } @Override @@ -277,7 +212,7 @@ public class EditCatchesUIHandler extends AbstractTuttiTabContainerUIHandler<Edi log.debug("closing: " + ui); } ui.getCatchesCaracteristicsAttachmentsButton().onCloseUI(); - clearSVG(); + editCatchesSvgHandler.clearSVG(); // close batches tabs, then general tab closeUI(ui.getSpeciesTabContent()); @@ -336,10 +271,10 @@ public class EditCatchesUIHandler extends AbstractTuttiTabContainerUIHandler<Edi if (result && currentIndex != newIndex) { if (currentIndex == 0) { - clearSVG(); + editCatchesSvgHandler.clearSVG(); } if (newIndex == 0 && getUI().isVisible()) { - initResumeSvg(); + editCatchesSvgHandler.initResumeSvg(); } } @@ -407,7 +342,7 @@ public class EditCatchesUIHandler extends AbstractTuttiTabContainerUIHandler<Edi } if (result) { - clearSVG(); + editCatchesSvgHandler.clearSVG(); } return result; @@ -416,7 +351,7 @@ public class EditCatchesUIHandler extends AbstractTuttiTabContainerUIHandler<Edi @Override public void onShowTab(int currentIndex, int newIndex) { registerValidators(); - initResumeSvg(); + editCatchesSvgHandler.initResumeSvg(); } @Override @@ -757,656 +692,4 @@ public class EditCatchesUIHandler extends AbstractTuttiTabContainerUIHandler<Edi } } - public String getWeightStringValueForTotalWeight(JLabel label, Float rejectWeight, Float totalWeight) { - String result; - if (rejectWeight == null || totalWeight == null) { - - // no reject weight, so can let this weight - result = getWeightStringValue(label, totalWeight); - } else { - result = t("tutti.editCatchBatch.field.speciesOrBenthosTotalWeight.not.computed"); - } - return result; - } - - public Color getWeightColorForTotalWeight(Float rejectWeight, Float totalWeight) { - //jTextField.setDisabledTextColor( - Color result; - if (rejectWeight == null || totalWeight == null) { - - // no reject weight, so can let this weight - result = getConfig().getColorComputedWeights(); - } else { - result = Color.RED; - } - return result; - } - - //------------------------------------------------------------------------// - //-- Protected methods --// - //------------------------------------------------------------------------// - - protected void initResumeSvg() { - try { - String parser = XMLResourceDescriptor.getXMLParserClassName(); - SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser); - URL url = Resource.getURL("EcranResume.svg"); - svgDocument = f.createDocument(url.toString()); - - // redefine user agent to avoid displaying errors about css - canvas = new JSVGCanvas(ua, true, true); - canvas.setBackground(Color.decode("#d6d9df")); - canvas.setSize(new Dimension(1, 1)); - canvas.setMySize(new Dimension(1, 1)); - - canvas.setRecenterOnResize(true); - - final TuttiConfiguration config = getConfig(); - - final Color catchColor = config.getColorCatch(); - final Color speciesColor = config.getColorSpecies(); - final Color benthosColor = config.getColorBenthos(); - - canvas.addGVTTreeRendererListener(new GVTTreeRendererAdapter() { - @Override - public void gvtRenderingCompleted(GVTTreeRendererEvent gvtTreeRendererEvent) { - if (log.isDebugEnabled()) { - log.debug("gvtRenderingCompleted"); - } - WeightUnit catchWeightUnit = WeightUnit.KG; - WeightUnit speciesWeightUnit = config.getSpeciesWeightUnit(); - WeightUnit benthosWeightUnit = config.getBenthosWeightUnit(); - WeightUnit marineLitterWeightUnit = config.getMarineLitterWeightUnit(); - - EditCatchesUIModel model = getModel(); - initSvgField(CatchBatch.PROPERTY_CATCH_TOTAL_WEIGHT, - CatchBatch.PROPERTY_CATCH_TOTAL_COMPUTED_WEIGHT, - model.getCatchTotalComputedOrNotWeight(), - catchWeightUnit, - catchColor); - - initSvgField(CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_COMPUTED_WEIGHT, catchWeightUnit, catchColor); - initSvgField(CatchBatch.PROPERTY_CATCH_TOTAL_REJECTED_WEIGHT, - CatchBatch.PROPERTY_CATCH_TOTAL_REJECTED_COMPUTED_WEIGHT, - model.getCatchTotalRejectedComputedOrNotWeight(), - catchWeightUnit, - catchColor); - initSvgField(CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_SORTED_COMPUTED_WEIGHT, catchWeightUnit, catchColor); - - initSvgField(CatchBatch.PROPERTY_SPECIES_TOTAL_SORTED_WEIGHT, - CatchBatch.PROPERTY_SPECIES_TOTAL_SORTED_COMPUTED_WEIGHT, - model.getSpeciesTotalSortedComputedOrNotWeight(), - speciesWeightUnit, - speciesColor); - initSvgField(CatchBatch.PROPERTY_SPECIES_TOTAL_SAMPLE_SORTED_COMPUTED_WEIGHT, speciesWeightUnit, speciesColor); - - initSvgField(CatchBatch.PROPERTY_BENTHOS_TOTAL_SORTED_WEIGHT, - CatchBatch.PROPERTY_BENTHOS_TOTAL_SORTED_COMPUTED_WEIGHT, - model.getBenthosTotalSortedComputedOrNotWeight(), - benthosWeightUnit, - benthosColor); - initSvgField(CatchBatch.PROPERTY_BENTHOS_TOTAL_SAMPLE_SORTED_COMPUTED_WEIGHT, benthosWeightUnit, benthosColor); - - initSvgField(CatchBatch.PROPERTY_CATCH_TOTAL_UNSORTED_COMPUTED_WEIGHT, catchWeightUnit, catchColor); - initSvgField(CatchBatch.PROPERTY_SPECIES_TOTAL_UNSORTED_COMPUTED_WEIGHT, speciesWeightUnit, speciesColor); - initSvgField(CatchBatch.PROPERTY_BENTHOS_TOTAL_UNSORTED_COMPUTED_WEIGHT, benthosWeightUnit, benthosColor); - - addSvgRelatedPropertyChangeListener(null, new ChangeElementBackgroundColorPropertyChangeListener( - CatchBatch.PROPERTY_SPECIES_TOTAL_UNSORTED_COMPUTED_WEIGHT, - Sets.newHashSet(CatchBatch.PROPERTY_CATCH_TOTAL_REJECTED_WEIGHT, - CatchBatch.PROPERTY_CATCH_TOTAL_REJECTED_COMPUTED_WEIGHT, - CatchBatch.PROPERTY_SPECIES_TOTAL_SORTED_WEIGHT, - CatchBatch.PROPERTY_SPECIES_TOTAL_SORTED_COMPUTED_WEIGHT, - CatchBatch.PROPERTY_SPECIES_TOTAL_SAMPLE_SORTED_COMPUTED_WEIGHT), - new Function<EditCatchesUIModel, Color>() { - @Override - public Color apply(EditCatchesUIModel model) { - boolean warning = model.isSpeciesTotalUnsortedComputedWeightInWarning(); - return warning ? Color.ORANGE : speciesColor; - } - })); - - addSvgRelatedPropertyChangeListener(null, new ChangeElementBackgroundColorPropertyChangeListener( - CatchBatch.PROPERTY_BENTHOS_TOTAL_UNSORTED_COMPUTED_WEIGHT, - Sets.newHashSet(CatchBatch.PROPERTY_CATCH_TOTAL_REJECTED_WEIGHT, - CatchBatch.PROPERTY_CATCH_TOTAL_REJECTED_COMPUTED_WEIGHT, - CatchBatch.PROPERTY_BENTHOS_TOTAL_SORTED_WEIGHT, - CatchBatch.PROPERTY_BENTHOS_TOTAL_SORTED_COMPUTED_WEIGHT, - CatchBatch.PROPERTY_BENTHOS_TOTAL_SAMPLE_SORTED_COMPUTED_WEIGHT), - new Function<EditCatchesUIModel, Color>() { - @Override - public Color apply(EditCatchesUIModel model) { - boolean warning = model.isBenthosTotalUnsortedComputedWeightInWarning(); - return warning ? Color.ORANGE : benthosColor; - } - })); - - initSvgField(CatchBatch.PROPERTY_SPECIES_TOTAL_COMPUTED_WEIGHT, - speciesWeightUnit, - speciesColor, - CatchBatch.PROPERTY_BENTHOS_TOTAL_COMPUTED_WEIGHT, - CatchBatch.PROPERTY_MARINE_LITTER_TOTAL_WEIGHT); - initSvgField(CatchBatch.PROPERTY_BENTHOS_TOTAL_COMPUTED_WEIGHT, - benthosWeightUnit, - benthosColor, - CatchBatch.PROPERTY_SPECIES_TOTAL_COMPUTED_WEIGHT, - CatchBatch.PROPERTY_MARINE_LITTER_TOTAL_WEIGHT); - initSvgField(CatchBatch.PROPERTY_MARINE_LITTER_TOTAL_WEIGHT, - CatchBatch.PROPERTY_MARINE_LITTER_TOTAL_COMPUTED_WEIGHT, - model.getMarineLitterTotalComputedOrNotWeight(), - marineLitterWeightUnit, - catchColor, - CatchBatch.PROPERTY_SPECIES_TOTAL_COMPUTED_WEIGHT, - CatchBatch.PROPERTY_BENTHOS_TOTAL_COMPUTED_WEIGHT); - - addSvgRelatedPropertyChangeListener(null, new RatioPropertyChangeListener("ratioSpeciesSampleSortedOverSpeciesSortedWeightLabel", - CatchBatch.PROPERTY_SPECIES_TOTAL_SAMPLE_SORTED_COMPUTED_WEIGHT, - CatchBatch.PROPERTY_SPECIES_TOTAL_SORTED_WEIGHT, - CatchBatch.PROPERTY_SPECIES_TOTAL_SORTED_COMPUTED_WEIGHT)); - addSvgRelatedPropertyChangeListener(null, new RatioPropertyChangeListener("ratioBenthosSampleSortedOverBenthosSortedWeightLabel", - CatchBatch.PROPERTY_BENTHOS_TOTAL_SAMPLE_SORTED_COMPUTED_WEIGHT, - CatchBatch.PROPERTY_BENTHOS_TOTAL_SORTED_WEIGHT, - CatchBatch.PROPERTY_BENTHOS_TOTAL_SORTED_COMPUTED_WEIGHT)); - addSvgRelatedPropertyChangeListener(null, new RatioPropertyChangeListener("ratioSortedSortedOverSortedWeightLabel", - CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_SORTED_COMPUTED_WEIGHT, - CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_COMPUTED_WEIGHT, - CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_COMPUTED_WEIGHT)); - - initSpeciesCount(CatchBatch.PROPERTY_SPECIES_DISTINCT_SORTED_SPECIES_COUNT); - initSpeciesCount(CatchBatch.PROPERTY_BENTHOS_DISTINCT_SORTED_SPECIES_COUNT); - - initTremieCarrouselField(CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_CAROUSSEL_WEIGHT, catchWeightUnit); - initTremieCarrouselField(CatchBatch.PROPERTY_CATCH_TOTAL_SORTED_TREMIS_WEIGHT, catchWeightUnit); - - getUI().getSvgCanvasPanel().add(canvas, BorderLayout.CENTER); - } - }); - - canvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC); - canvas.setDocument(svgDocument); - - } catch (IOException err) { - if (log.isErrorEnabled()) { - log.error("error while initializing the resume background", err); - } - getContext().getErrorHelper().showErrorDialog(t("tutti.editCatchBatch.svgLoading.error"), err); - } - } - - protected void initSpeciesCount(final String property) { - - if (log.isDebugEnabled()) { - log.debug("init " + property + " field"); - } - - updateOnCanvas(new Runnable() { - @Override - public void run() { - Element labelElement = svgDocument.getElementById(property + "Label"); - labelElement.setTextContent(t("tutti.editCatchBatch.field." + property)); - - Element valueElement = svgDocument.getElementById(property + "Value"); - Integer value; - try { - String sValue = BeanUtils.getProperty(getModel(), property); - if (sValue != null) { - value = Integer.parseInt(sValue); - } else { - value = null; - } - - } catch (ReflectiveOperationException e) { - if (log.isErrorEnabled()) { - log.error("error on reading model's property " + property, e); - } - value = null; - } - valueElement.setTextContent(JAXXUtil.getStringValue(value)); - } - }); - - addSvgRelatedPropertyChangeListener(property, new PropertyChangeListener() { - @Override - public void propertyChange(PropertyChangeEvent evt) { - Integer value = (Integer) evt.getNewValue(); - Element labelElement = svgDocument.getElementById(property + "Value"); - labelElement.setTextContent(JAXXUtil.getStringValue(value)); - } - }); - } - - protected void initTremieCarrouselField(final String property, final WeightUnit weightUnit) { - if (log.isDebugEnabled()) { - log.debug("init " + property + " field"); - } - - updateOnCanvas(new Runnable() { - @Override - public void run() { - Element labelElement = svgDocument.getElementById(property + "Label"); - labelElement.setTextContent(weightUnit.decorateLabel(t("tutti.editCatchBatch.field." + property))); - } - }); - - addSvgRelatedPropertyChangeListener(property, new PropertyChangeListener() { - @Override - public void propertyChange(PropertyChangeEvent evt) { - Float value = (Float) evt.getNewValue(); - updateValue(property, value, weightUnit, true); - } - }); - - Float value = getModelPropertyValue(property); - updateValue(property, value, weightUnit, true); - - addSvgRelatedPropertyChangeListener(EditCatchesUIModel.PROPERTY_FISHING_OPERATION, new PropertyChangeListener() { - @Override - public void propertyChange(PropertyChangeEvent evt) { - updateTremieCarrouselVisibility(property); - } - }); - updateTremieCarrouselVisibility(property); - } - - protected void updateTremieCarrouselVisibility(String property) { - EditCatchesUIModel model = getModel(); - FishingOperation fishingOperation = model.getFishingOperation(); - if (fishingOperation != null) { - boolean tremieCarrouselFieldsVisisble = fishingOperation.getVessel() != null - && fishingOperation.getVessel().getId().equals(getConfig().getTremieCarousselVesselId()); - - Element labelElement = svgDocument.getElementById(property + "Label"); - labelElement.setAttribute("visibility", tremieCarrouselFieldsVisisble ? "visible" : "hidden"); - - Element valueElement = svgDocument.getElementById(property + "Value"); - valueElement.setAttribute("visibility", tremieCarrouselFieldsVisisble ? "visible" : "hidden"); - } - } - - protected void initSvgField(String computedProperty, WeightUnit weightUnit, Color bgColor, String... idsInGroup) { - initSvgField(null, computedProperty, null, weightUnit, bgColor, idsInGroup); - } - - protected void initSvgField(String property, - String computedProperty, - final ComputableData<Float> computableData, - final WeightUnit weightUnit, - final Color bgColor, - final String... idsInGroup) { - - if (log.isDebugEnabled()) { - log.debug("init " + property + " field"); - } - - final String notNullProperty = property != null ? property : computedProperty; - - OnDataOrComputedDataValueChangedListener listener = new OnDataOrComputedDataValueChangedListener(notNullProperty, computableData, weightUnit, idsInGroup); - if (property != null) { - addSvgRelatedPropertyChangeListener(property, listener); - } - if (computedProperty != null) { - addSvgRelatedPropertyChangeListener(computedProperty, listener); - } - - if (computableData != null) { - // data or computed data value - Element element = svgDocument.getElementById(property); - EventTarget target = (EventTarget) element; - target.addEventListener("click", new OnValueClickListener(computableData, property, weightUnit), false); - } - - updateOnCanvas(new Runnable() { - @Override - public void run() { - - SVGOMRectElement rectElement = (SVGOMRectElement) svgDocument.getElementById(notNullProperty + "Rect"); - SVGRect bbox = rectElement.getBBox(); - Float x = bbox.getX(); - - SVGOMTextElement labelElement = (SVGOMTextElement) svgDocument.getElementById(notNullProperty + "Label"); - CSSStyleDeclaration style = labelElement.getStyle(); - if (computableData == null) { - style.setProperty("font-style", "italic", null); - } - int colorBrightness = TuttiUIUtil.getColorBrightness(bgColor); - String textColor = colorBrightness > 150 ? "#000000" : "#FFFFFF"; - style.setProperty("fill", textColor, null); - - labelElement.setTextContent(weightUnit.decorateLabel(t("tutti.editCatchBatch.field." + notNullProperty))); - bbox = labelElement.getBBox(); - float labelX = bbox.getX(); - float width = Math.abs(x - labelX) + 10; - - SVGOMRectElement labelRectElement = (SVGOMRectElement) svgDocument.getElementById(notNullProperty + "LabelRect"); - float actualWidth = Math.abs(labelRectElement.getBBox().getX() - labelX) + 10; - - if (actualWidth < width) { - labelRectElement.setAttribute("width", Float.toString(width)); - labelRectElement.setAttribute("x", String.valueOf(labelX - 10)); - - for (String id : idsInGroup) { - Element el = svgDocument.getElementById(id + "LabelRect"); - el.setAttribute("width", Float.toString(width)); - el.setAttribute("x", String.valueOf(labelX - 10)); - } - } - - style = labelRectElement.getStyle(); - String hexaColor = "#" + Integer.toHexString(bgColor.getRGB()).substring(2); - style.setProperty("fill", hexaColor, null); - - Float value; - boolean computed; - if (computableData == null) { - computed = true; - value = getModelPropertyValue(notNullProperty); - - } else if (computableData.getData() == null) { - computed = true; - value = computableData.getComputedData(); - - } else { - computed = false; - value = computableData.getData(); - } - - updateValue(notNullProperty, value, weightUnit, computed, idsInGroup); - } - }); - - } - - protected void updateOnCanvas(Runnable runnable) { - try { - canvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(runnable); - } catch (IllegalStateException e) { - if (log.isErrorEnabled()) { - log.error("error while updating canvas, reload it"); - } - clearSVG(); - initResumeSvg(); - } - } - - protected Float getModelPropertyValue(String property) { - Float value; - try { - String sValue = BeanUtils.getProperty(getModel(), property); - if (sValue != null) { - value = Float.parseFloat(sValue); - } else { - value = null; - } - - } catch (ReflectiveOperationException e) { - if (log.isErrorEnabled()) { - log.error("error on reading model's property " + property, e); - } - value = null; - } - return value; - } - - protected void clearSVG() { - for (String property : svgRelatedPropertyChangeListeners.keySet()) { - for (PropertyChangeListener listener : svgRelatedPropertyChangeListeners.get(property)) { - if (property != null) { - getModel().removePropertyChangeListener(property, listener); - } else { - getModel().removePropertyChangeListener(listener); - } - } - } - svgRelatedPropertyChangeListeners.clear(); - - if (canvas != null) { - canvas.dispose(); - getUI().getSvgCanvasPanel().remove(canvas); - } - } - - protected void addSvgRelatedPropertyChangeListener(String property, PropertyChangeListener listener) { - svgRelatedPropertyChangeListeners.put(property, listener); - if (property != null) { - getModel().addPropertyChangeListener(property, listener); - } else { - getModel().addPropertyChangeListener(listener); - } - } - - protected void updateValue(final String property, - final Float value, - final WeightUnit weightUnit, - final boolean computed, - final String... idsInGroup) { - - updateOnCanvas(new Runnable() { - public void run() { - if (log.isDebugEnabled()) { - log.debug("update " + property + " field"); - } - - SVGOMTextElement valueElement = (SVGOMTextElement) svgDocument.getElementById(property + "Value"); - if (valueElement == null) { - return; - } - - //TODO i18n ? - String textContent; - if (value != null) { - textContent = Weights.getWeightStringValue(value) + " " + weightUnit.getShortLabel(); - } else { - textContent = null; - } - valueElement.setTextContent(textContent); - - CSSStyleDeclaration style = valueElement.getStyle(); - - Color colorComputedWeights = getConfig().getColorComputedWeights(); - String computedColor = "#" + Integer.toHexString(colorComputedWeights.getRGB()).substring(2); - style.setProperty("fill", computed ? computedColor : "#000000", null); - style.setProperty("font-style", computed ? "italic" : "normal", null); - - SVGRect bbox = valueElement.getBBox(); - SVGOMRectElement rectElement = (SVGOMRectElement) svgDocument.getElementById(property + "Rect"); - if (bbox != null && rectElement != null) { - float width = bbox.getWidth() + 15; - float actualWidth = rectElement.getBBox().getWidth(); - if (actualWidth < width) { - rectElement.setAttribute("width", Float.toString(width)); - for (String id : idsInGroup) { - Element el = svgDocument.getElementById(id + "Rect"); - el.setAttribute("width", Float.toString(width)); - } - } - } - } - }); - - } - - private class OnValueClickListener implements EventListener { - - private final ComputableData<Float> computableData; - - private final String property; - - private final WeightUnit weightUnit; - - public OnValueClickListener(ComputableData<Float> computableData, String property, WeightUnit weightUnit) { - this.computableData = computableData; - this.property = property; - this.weightUnit = weightUnit; - } - - public void handleEvent(org.w3c.dom.events.Event evt) { - log.info("element clicked"); - EnterWeightUI dialog = new EnterWeightUI(getContext()); - Float originalWeight = computableData.getData(); - Float weight = dialog.openAndGetWeightValue(t("tutti.editCatchBatch.field." + property), - originalWeight, - weightUnit); - - if (!Objects.equals(originalWeight, weight)) { - - computableData.setData(weight); - } - } - } - - private class OnDataOrComputedDataValueChangedListener implements PropertyChangeListener { - - private final String property; - private final ComputableData<Float> computableData; - private final WeightUnit weightUnit; - private final String[] idsInGroup; - - public OnDataOrComputedDataValueChangedListener(String property, - ComputableData<Float> computableData, - WeightUnit weightUnit, - String... idsInGroup) { - this.property = property; - this.computableData = computableData; - this.weightUnit = weightUnit; - this.idsInGroup = idsInGroup; - } - - @Override - public void propertyChange(PropertyChangeEvent evt) { - boolean computedData; - Float newValue; - - if (computableData == null) { - computedData = true; - newValue = (Float) evt.getNewValue(); - - } else { - if (computableData.getData() == null) { - computedData = true; - newValue = computableData.getComputedData(); - - } else { - computedData = false; - newValue = computableData.getData(); - } - } - updateValue(property, newValue, weightUnit, computedData, idsInGroup); - } - - } - - private class ChangeElementBackgroundColorPropertyChangeListener implements PropertyChangeListener { - - private final String elementId; - private Set<String> propertiesToListen; - private Function<EditCatchesUIModel, Color> colorFunction; - - public ChangeElementBackgroundColorPropertyChangeListener(String elementId, - Set<String> propertiesToListen, - Function<EditCatchesUIModel, Color> colorFunction) { - this.elementId = elementId; - this.propertiesToListen = propertiesToListen; - this.colorFunction = colorFunction; - - updateColor(); - } - - @Override - public void propertyChange(PropertyChangeEvent evt) { - if (propertiesToListen.contains(evt.getPropertyName())) { - updateColor(); - } - } - - protected void updateColor() { - updateOnCanvas(new Runnable() { - public void run() { - if (log.isDebugEnabled()) { - log.debug("update " + elementId + " field"); - } - - Element rectElement = svgDocument.getElementById(elementId + "LabelRect"); - SVGStylable field = (SVGStylable) rectElement; - CSSStyleDeclaration style = field.getStyle(); - - final Color background = colorFunction.apply(getModel()); - String color = "#" + Integer.toHexString(background.getRGB()).substring(2); - style.setProperty("fill", color, null); - } - }); - } - } - - private class RatioPropertyChangeListener implements PropertyChangeListener { - - private final String elementId; - private final String numeratorProperty; - private final String denominatorProperty; - private final String denominatorComputedProperty; - private Integer ratio = null; - - public RatioPropertyChangeListener(String elementId, - String numeratorProperty, - String denominatorProperty, - String denominatorComputedProperty) { - this.elementId = elementId; - this.numeratorProperty = numeratorProperty; - this.denominatorProperty = denominatorProperty; - this.denominatorComputedProperty = denominatorComputedProperty; - - updateRatioText(); - } - - @Override - public void propertyChange(PropertyChangeEvent evt) { - String propertyName = evt.getPropertyName(); - - if (propertyName.equals(numeratorProperty) || propertyName.equals(denominatorProperty)) { - updateRatioText(); - } - } - - protected void updateRatioText() { - EditCatchesUIModel model = getModel(); - - try { - String numerator = BeanUtils.getProperty(model, numeratorProperty); - String denominator = BeanUtils.getProperty(model, denominatorProperty); - if (denominator == null) { - denominator = BeanUtils.getProperty(model, denominatorComputedProperty); - } - - if (numerator != null && denominator != null) { - Float numeratorValue = Float.valueOf(numerator); - Float denominatorValue = Float.valueOf(denominator); - - if (denominatorValue != 0) { - ratio = Numbers.roundToInt(100f * numeratorValue / denominatorValue); - } - } - - } catch (ReflectiveOperationException e) { - if (log.isErrorEnabled()) { - log.error("Error while computing the ration", e); - } - } - - updateOnCanvas(new Runnable() { - public void run() { - if (log.isDebugEnabled()) { - log.debug("update " + elementId + " field"); - } - - Element ratioElement = svgDocument.getElementById(elementId); - String textContent; - if (ratio != null) { - textContent = ratio + "%"; - } else { - textContent = null; - } - ratioElement.setTextContent(textContent); - } - }); - } - } } diff --git a/tutti-ui-swing/src/main/resources/EcranResume.svg b/tutti-ui-swing/src/main/resources/EcranResume.svg index 22ff9c4..512bbfe 100644 --- a/tutti-ui-swing/src/main/resources/EcranResume.svg +++ b/tutti-ui-swing/src/main/resources/EcranResume.svg @@ -120,7 +120,7 @@ id="catchTotalWeightLabel" y="-186.02356" x="630.37976" - style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;specification:Arial" xml:space="preserve">CAPTURE TOTALE</text> <rect style="fill:#ffffff;fill-opacity:1;stroke:#666666;stroke-width:0.44218841;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" @@ -134,7 +134,7 @@ x="643.71143" y="-186.02356" id="catchTotalWeightValue" - style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;specification:Arial" sodipodi:linespacing="125%">123456.789 kg</text> </g> <g @@ -157,7 +157,7 @@ x="494.73022" y="-150.78915" id="catchTotalSortedComputedWeightLabel" - style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">VRAC</text> + style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;specification:Arial">VRAC</text> <rect y="-169.07013" x="501.44632" @@ -170,7 +170,7 @@ y="-150.78915" x="507.67651" xml:space="preserve" - style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">123456.789 kg</text> + style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;specification:Arial">123456.789 kg</text> </g> </g> </g> @@ -190,7 +190,7 @@ y="-112.25434" x="794.77008" xml:space="preserve" - style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">HORS VRAC</text> + style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;specification:Arial">HORS VRAC</text> <rect style="fill:#ffffff;fill-opacity:1;stroke:#666666;stroke-width:0.37943435;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="catchTotalUnsortedComputedWeightRect" @@ -203,7 +203,7 @@ x="806.42346" y="-112.25434" id="catchTotalUnsortedComputedWeightValue" - style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">123456.789 kg</text> + style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;specification:Arial">123456.789 kg</text> </g> <path sodipodi:type="star" @@ -253,7 +253,7 @@ id="speciesTotalUnsortedComputedWeightLabelRect" style="fill:#006bba;fill-opacity:1;stroke:#666666;stroke-width:0.59367329;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <text - style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;specification:Arial" id="speciesTotalUnsortedComputedWeightLabel" xml:space="preserve" x="495.87607" @@ -266,7 +266,7 @@ id="speciesTotalUnsortedComputedWeightRect" style="fill:#ffffff;fill-opacity:1;stroke:#666666;stroke-width:0.37943435;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <text - style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;specification:Arial" id="speciesTotalUnsortedComputedWeightValue" y="-151.6066" x="509.46756" @@ -291,7 +291,7 @@ y="-79.496262" x="870.6496" xml:space="preserve" - style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">Benthos observés</text> + style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;specification:Arial">Benthos observés</text> <rect style="fill:#ffffff;fill-opacity:1;stroke:#666666;stroke-width:0.37943435;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="benthosTotalUnsortedComputedWeightRect" @@ -304,7 +304,7 @@ x="883.16284" y="-78.660912" id="benthosTotalUnsortedComputedWeightValue" - style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">123456.789 kg</text> + style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;specification:Arial">123456.789 kg</text> </g> </g> <path @@ -367,7 +367,7 @@ x="493.81497" y="-151.49626" id="catchTotalRejectedWeightLabel" - style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">Vrac non trié</text> + style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;specification:Arial">Vrac non trié</text> <rect y="-169.07013" x="501.44632" @@ -377,7 +377,7 @@ style="fill:#ffffff;fill-opacity:1;stroke:#666666;stroke-width:0.37943435;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <text xml:space="preserve" - style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;specification:Arial" id="catchTotalRejectedWeightValue" y="-150.66092" x="507.49289">123456.789 kg</text> @@ -401,7 +401,7 @@ x="866.47284" y="-79.496262" id="catchTotalSortedSortedComputedWeightLabel" - style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">Vrac trié</text> + style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;specification:Arial">Vrac trié</text> <rect y="-97.070129" x="875.44556" @@ -413,7 +413,7 @@ y="-78.660904" x="881.90985" xml:space="preserve" - style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;specification:Arial" id="catchTotalSortedSortedComputedWeightValue">123456.789 kg</text> </g> </g> @@ -476,7 +476,7 @@ style="fill:#006bba;fill-opacity:1;stroke:#666666;stroke-width:0.59367329;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <text xml:space="preserve" - style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;specification:Arial" id="speciesTotalSortedWeightLabel" y="-151.49626" x="494.65033">Espèce trié</text> @@ -492,7 +492,7 @@ x="508.32825" y="-150.6609" id="speciesTotalSortedWeightValue" - style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">123456.789 kg</text> + style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;specification:Arial">123456.789 kg</text> </g> </g> </g> @@ -518,7 +518,7 @@ style="fill:#006bba;fill-opacity:1;stroke:#666666;stroke-width:0.59367329;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <text xml:space="preserve" - style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;specification:Arial" id="benthosTotalSortedWeightLabel" y="-79.496262" x="867.30817">Benthos isolé</text> @@ -534,7 +534,7 @@ x="883.16284" y="-78.660912" id="benthosTotalSortedWeightValue" - style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">123456.789 kg</text> + style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;specification:Arial">123456.789 kg</text> </g> </g> <path @@ -597,7 +597,7 @@ x="869.81427" y="-79.496262" id="benthosTotalSampleSortedComputedWeightLabel" - style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">Vrac observé</text> + style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;specification:Arial">Vrac observé</text> <rect y="-97.070129" x="875.44556" @@ -607,7 +607,7 @@ style="fill:#ffffff;fill-opacity:1;stroke:#666666;stroke-width:0.37943435;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <text xml:space="preserve" - style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;specification:Arial" id="benthosTotalSampleSortedComputedWeightValue" y="-78.660912" x="881.07446">123456.789 kg</text> @@ -649,7 +649,7 @@ x="495.48569" y="-151.49626" id="speciesTotalSampleSortedComputedWeightLabel" - style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">Vrac observé</text> + style="font-size:10.63231468px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;specification:Arial">Vrac observé</text> <rect y="-169.07013" x="501.44632" @@ -659,7 +659,7 @@ style="fill:#ffffff;fill-opacity:1;stroke:#666666;stroke-width:0.37943435;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <text xml:space="preserve" - style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:12.01316166px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;specification:Arial" id="speciesTotalSampleSortedComputedWeightValue" y="-151.07858" x="508.74591">123456.789 kg</text> @@ -694,7 +694,7 @@ id="marineLitterTotalWeightLabelRect" style="fill:#555555;fill-opacity:1;stroke:#666666;stroke-width:0.58228976;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <text - style="font-size:10.4617157px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:10.4617157px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;specification:Arial" id="marineLitterTotalWeightLabel" y="-226.17451" x="874.85834" @@ -710,7 +710,7 @@ x="889.35681" y="-225.77646" id="marineLitterTotalWeightValue" - style="font-size:10.4617157px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:10.4617157px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;specification:Arial" xml:space="preserve">123456.789 kg</text> </g> <g @@ -727,7 +727,7 @@ x="873.66412" y="-247.47125" id="benthosTotalComputedWeightLabel" - style="font-size:10.4617157px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:10.4617157px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;specification:Arial" xml:space="preserve">Total Benthos</text> <rect y="-262.77554" @@ -737,7 +737,7 @@ id="benthosTotalComputedWeightRect" style="fill:#ffffff;fill-opacity:1;stroke:#666666;stroke-width:0.33043209;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <text - style="font-size:10.4617157px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:10.4617157px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;specification:Arial" id="benthosTotalComputedWeightValue" y="-247.47125" x="888.79388" @@ -757,7 +757,7 @@ x="874.46027" y="-269.16605" id="speciesTotalComputedWeightLabel" - style="font-size:10.4617157px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:10.4617157px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Arial;specification:Arial" xml:space="preserve">Total Espèces</text> <rect y="-284.47034" @@ -767,7 +767,7 @@ id="speciesTotalComputedWeightRect" style="fill:#ffffff;fill-opacity:1;stroke:#666666;stroke-width:0.33043209;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <text - style="font-size:10.4617157px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" + style="font-size:10.4617157px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;font-family:Arial;specification:Arial" id="speciesTotalComputedWeightValue" y="-269.16605" x="889.91974" @@ -775,7 +775,7 @@ </g> <text xml:space="preserve" - style="font-size:10px;font-style:italic;font-weight:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#0000ff;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Italic" + style="font-size:10px;font-style:italic;font-weight:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#0000ff;fill-opacity:1;stroke:none;font-family:Sans;specification:Sans Italic" x="469.26474" y="161.52475" id="ratioSpeciesSampleSortedOverSpeciesSortedWeightLabel" @@ -783,14 +783,14 @@ inkscape:label="#text3186">100%</text> <text xml:space="preserve" - style="font-size:10px;font-style:italic;font-weight:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#0000ff;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Italic" + style="font-size:10px;font-style:italic;font-weight:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#0000ff;fill-opacity:1;stroke:none;font-family:Sans;specification:Sans Italic" x="721.14075" y="160.8163" id="ratioBenthosSampleSortedOverBenthosSortedWeightLabel" sodipodi:linespacing="125%">100%</text> <text xml:space="preserve" - style="font-size:10px;font-style:italic;font-weight:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#0000ff;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Italic" + style="font-size:10px;font-style:italic;font-weight:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#0000ff;fill-opacity:1;stroke:none;font-family:Sans;specification:Sans Italic" x="590.1601" y="-7.440062" id="ratioSortedSortedOverSortedWeightLabel" @@ -813,14 +813,14 @@ inkscape:transform-center-y="-4.5351562">Nombre d'espèces :</text> <text xml:space="preserve" - style="font-size:10px;font-style:italic;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Italic" + style="font-size:10px;font-style:italic;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;font-family:Sans;specification:Sans Italic" x="477.60803" y="231.57071" id="speciesDistinctSortedSpeciesCountValue" sodipodi:linespacing="125%">123465</text> <text xml:space="preserve" - style="font-size:10px;font-style:italic;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Italic" + style="font-size:10px;font-style:italic;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;font-family:Sans;specification:Sans Italic" x="730.47382" y="232.45459" id="benthosDistinctSortedSpeciesCountValue" @@ -830,24 +830,24 @@ x="454.94089" y="-63.274731" id="catchTotalSortedTremisWeightLabel" - style="font-size:10px;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#0000ff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">Trémie</text> + style="font-size:10px;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#0000ff;fill-opacity:1;font-family:Arial;specification:Arial">Trémie</text> <text id="catchTotalSortedTremisWeightValue" y="-47.188046" x="455.08459" xml:space="preserve" - style="font-size:11px;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#0000ff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">123456.789 kg</text> + style="font-size:11px;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#0000ff;fill-opacity:1;font-family:Arial;specification:Arial">123456.789 kg</text> <text xml:space="preserve" x="608.10168" y="52.185638" id="catchTotalSortedCarousselWeightLabel" - style="font-size:10px;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#0000ff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">Carrousel</text> + style="font-size:10px;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#0000ff;fill-opacity:1;font-family:Arial;specification:Arial">Carrousel</text> <text id="catchTotalSortedCarousselWeightValue" y="67.177635" x="606.9054" xml:space="preserve" - style="font-size:11px;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#0000ff;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">123456.789 kg</text> + style="font-size:11px;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;text-anchor:start;fill:#0000ff;fill-opacity:1;font-family:Arial;specification:Arial">123456.789 kg</text> </g> </svg> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.