branch develop updated (10eaed7 -> 0c6753d)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository tutti. See https://gitlab.nuiton.org/codelutin/tutti.git from 10eaed7 Go-Go-go to develop Merge branch 'feature/observations_individuelles-amélioration_notification' into develop adds a54cbad possibilité de modifier les caracteristics à ne pas pouvoir ajouter adds 47f1ac1 on reconstruit la map des caracteristiques par defaut à chaque editbatch new e54d839 Ne pas propager des propriétés inutilement new 287ca41 Bien libérer les listener quand on quitte l'écran new 0c6753d Retour sur develop Merge branch 'feature/observations_individuelles-init_default_caracteristics' into develop The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 0c6753db8d92cde3fe8660da5eb1f1dc9a243b12 Merge: 10eaed7 287ca41 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 27 15:25:19 2016 +0200 Retour sur develop Merge branch 'feature/observations_individuelles-init_default_caracteristics' into develop commit 287ca4198fee469327bd3e3bdc6806be63528c51 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 27 15:25:09 2016 +0200 Bien libérer les listener quand on quitte l'écran commit e54d839c89961d3a260ec0329c93b51665ff0e5e Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 27 15:14:10 2016 +0200 Ne pas propager des propriétés inutilement Summary of changes: .../IndividualObservationBatchTableHandler.java | 46 ++++++++++++--- .../IndividualObservationBatchTableModel.java | 33 +++-------- .../IndividualObservationBatchUIModel.java | 27 ++++----- .../frequency/SpeciesFrequencyUIHandler.java | 66 ++++++++++++---------- .../species/frequency/SpeciesFrequencyUIModel.java | 4 +- .../CaracteristicMapCellComponent.java | 16 ++++-- .../CaracteristicMapEditorUIHandler.java | 5 +- .../CaracteristicMapEditorUIModel.java | 24 ++++++-- 8 files changed, 126 insertions(+), 95 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See https://gitlab.nuiton.org/codelutin/tutti.git commit e54d839c89961d3a260ec0329c93b51665ff0e5e Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 27 15:14:10 2016 +0200 Ne pas propager des propriétés inutilement --- .../species/frequency/IndividualObservationBatchUIModel.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/IndividualObservationBatchUIModel.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/IndividualObservationBatchUIModel.java index 6dca8d1..e2b0db1 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/IndividualObservationBatchUIModel.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/IndividualObservationBatchUIModel.java @@ -52,10 +52,6 @@ public class IndividualObservationBatchUIModel extends AbstractTuttiTableUIModel /** Logger. */ private static final Log log = LogFactory.getLog(IndividualObservationBatchUIModel.class); - public static final String PROPERTY_MATURITY_CARACTERISTIC = "maturityCaracteristic"; - - public static final String PROPERTY_NOT_EDITABLE_CARACTERISTIC = "notEditableCaracteristic"; - /** * Global screen model. * @@ -151,9 +147,7 @@ public class IndividualObservationBatchUIModel extends AbstractTuttiTableUIModel } public void setMaturityCaracteristic(Caracteristic maturityCaracteristic) { - Object oldValue = this.maturityCaracteristic; this.maturityCaracteristic = maturityCaracteristic; - firePropertyChange(PROPERTY_MATURITY_CARACTERISTIC, oldValue, maturityCaracteristic); } public CaracteristicQualitativeValue getMaturityValue(IndividualObservationBatchRowModel row) { @@ -213,14 +207,8 @@ public class IndividualObservationBatchUIModel extends AbstractTuttiTableUIModel } } - public Collection<Caracteristic> getNotEditableCaracteristic() { - return notEditableCaracteristic; - } - public void setNotEditableCaracteristic(Collection<Caracteristic> notEditableCaracteristic) { - Object oldValue = getNotEditableCaracteristic(); this.notEditableCaracteristic = notEditableCaracteristic; - firePropertyChange(PROPERTY_NOT_EDITABLE_CARACTERISTIC, oldValue, notEditableCaracteristic); } /** -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See https://gitlab.nuiton.org/codelutin/tutti.git commit 287ca4198fee469327bd3e3bdc6806be63528c51 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 27 15:25:09 2016 +0200 Bien libérer les listener quand on quitte l'écran --- .../frequency/SpeciesFrequencyUIHandler.java | 63 +++++++++++----------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SpeciesFrequencyUIHandler.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SpeciesFrequencyUIHandler.java index f27ddab..c89c608 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SpeciesFrequencyUIHandler.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SpeciesFrequencyUIHandler.java @@ -163,6 +163,7 @@ public class SpeciesFrequencyUIHandler extends AbstractTuttiTableUIHandler<Speci protected Decorator<Caracteristic> caracteristicTipDecorator; protected Decorator<CaracteristicQualitativeValue> caracteristicQualitativeDecorator; protected SoundEngine soundEngine; + protected PropertyChangeListener listenFishingOperationReloadInDataContext; public SpeciesFrequencyUIHandler() { @@ -236,6 +237,19 @@ public class SpeciesFrequencyUIHandler extends AbstractTuttiTableUIHandler<Speci } }; + // pour recharger l'opération dans le modèle quand celle ci a changée (après une sauvegarde de l'opération par exemple) + this.listenFishingOperationReloadInDataContext = new PropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent event) { + TuttiDataContext source = (TuttiDataContext) event.getSource(); + FishingOperation fishingOperation = source.getFishingOperation(); + if (log.isInfoEnabled()) { + log.info("Reloading fishing operation in model: " + fishingOperation); + } + SpeciesFrequencyUIHandler.this.getModel().setFishingOperation(fishingOperation); + } + }; + } //------------------------------------------------------------------------// @@ -356,15 +370,9 @@ public class SpeciesFrequencyUIHandler extends AbstractTuttiTableUIHandler<Speci TuttiDataContext dataContext = getDataContext(); SampleCategoryModel sampleCategoryModel = dataContext.getSampleCategoryModel(); - // get the default caracteristics + // get the default caracteristics from protocol List<Caracteristic> protocolIndividualObservationCaracteristics = new ArrayList<>(dataContext.getDefaultIndividualObservationCaracteristics()); - -// // on ajoute toujours la colonne sex -// if (!protocolCaracteristic.contains(sexCaracteristic)) { -// protocolCaracteristic.add(0, sexCaracteristic); -// } - Optional<CruiseCache> optionalCruiseCache = dataContext.getOptionalCruiseCache(); if (!optionalCruiseCache.isPresent()) { throw new IllegalStateException("Can't find cruise cache"); @@ -389,15 +397,8 @@ public class SpeciesFrequencyUIHandler extends AbstractTuttiTableUIHandler<Speci // listen when caliper is connected or not and adjust the listener getContext().addPropertyChangeListener(TuttiUIContext.PROPERTY_CALIPER_CONNECTED, listenCaliperIsConnected); - // pour recharger l'opération dans le modèle quand celle ci a changée (après une sauvegarde de l'opération par exemple) - getDataContext().addPropertyChangeListener(TuttiDataContext.PROPERTY_FISHING_OPERATION_ID, event -> { - TuttiDataContext source = (TuttiDataContext) event.getSource(); - FishingOperation fishingOperation = source.getFishingOperation(); - if (log.isInfoEnabled()) { - log.info("Reloading fishing operation in model: " + fishingOperation); - } - model.setFishingOperation(fishingOperation); - }); + // listen when fishing operation reloaded in data context to propagate it to our model + getDataContext().addPropertyChangeListener(TuttiDataContext.PROPERTY_FISHING_OPERATION_ID, listenFishingOperationReloadInDataContext); } @@ -590,6 +591,22 @@ public class SpeciesFrequencyUIHandler extends AbstractTuttiTableUIHandler<Speci log.debug("closing: " + ui); } + getDataContext().removePropertyChangeListener(TuttiDataContext.PROPERTY_FISHING_OPERATION_ID, listenFishingOperationReloadInDataContext); + + TuttiUIContext context = getContext(); + context.removePropertyChangeListener(TuttiUIContext.PROPERTY_ICHTYOMETER_CONNECTED, listenIchtyomerIsConnected); + context.removePropertyChangeListener(TuttiUIContext.PROPERTY_CALIPER_CONNECTED, listenCaliperIsConnected); + + if (context.isIchtyometerConnected()) { + + context.getIchtyometerReader().removeFeedModeReaderListener(ichtyometerFeedReaderListener); + } + + if (context.isCaliperConnected()) { + + context.getCaliperReader().removeFeedModeReaderListener(caliperFeedReaderListener); + } + SpeciesFrequencyUIModel model = getModel(); IOUtils.closeQuietly(individualObservationBatchTableHandler); @@ -608,20 +625,6 @@ public class SpeciesFrequencyUIHandler extends AbstractTuttiTableUIHandler<Speci model.setSimpleCount(null); model.setModify(false); - TuttiUIContext context = getContext(); - context.removePropertyChangeListener(TuttiUIContext.PROPERTY_ICHTYOMETER_CONNECTED, listenIchtyomerIsConnected); - context.removePropertyChangeListener(TuttiUIContext.PROPERTY_CALIPER_CONNECTED, listenCaliperIsConnected); - - if (context.isIchtyometerConnected()) { - - context.getIchtyometerReader().removeFeedModeReaderListener(ichtyometerFeedReaderListener); - } - - if (context.isCaliperConnected()) { - - context.getCaliperReader().removeFeedModeReaderListener(caliperFeedReaderListener); - } - EditSpeciesBatchPanelUI parent = getParentContainer(EditSpeciesBatchPanelUI.class); parent.switchToEditBatch(); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See https://gitlab.nuiton.org/codelutin/tutti.git commit 0c6753db8d92cde3fe8660da5eb1f1dc9a243b12 Merge: 10eaed7 287ca41 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 27 15:25:19 2016 +0200 Retour sur develop Merge branch 'feature/observations_individuelles-init_default_caracteristics' into develop .../IndividualObservationBatchTableHandler.java | 46 ++++++++++++--- .../IndividualObservationBatchTableModel.java | 33 +++-------- .../IndividualObservationBatchUIModel.java | 27 ++++----- .../frequency/SpeciesFrequencyUIHandler.java | 66 ++++++++++++---------- .../species/frequency/SpeciesFrequencyUIModel.java | 4 +- .../CaracteristicMapCellComponent.java | 16 ++++-- .../CaracteristicMapEditorUIHandler.java | 5 +- .../CaracteristicMapEditorUIModel.java | 24 ++++++-- 8 files changed, 126 insertions(+), 95 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm