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 72ca87d8dcb41cbe7eeddc192bcf2f6710894b0f Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 20 09:48:03 2016 +0200 Ne plus conserver les états dans le modèle de zone de notification + renommage propriété --- .../frequency/SamplingNotificationZoneHandler.java | 8 +++---- .../frequency/SamplingNotificationZoneModel.java | 27 +++------------------- 2 files changed, 7 insertions(+), 28 deletions(-) diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SamplingNotificationZoneHandler.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SamplingNotificationZoneHandler.java index 9c9b2b0..d643d78 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SamplingNotificationZoneHandler.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SamplingNotificationZoneHandler.java @@ -183,12 +183,12 @@ public class SamplingNotificationZoneHandler implements Closeable { // toujours supprimer les listeners listSelectionModel.removeListSelectionListener(listSelectionListener); - model.removePropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SAMPLING_STATUS, modelStatusChanged); + model.removePropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SAMPLING_NOTIFICATION_ZONE_STATUS, modelStatusChanged); model.removePropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SELECTED_ROW, modelSelectedRowChanged); model.removePropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SUMMARY_TEXT, modelSummaryTextChanged); // on les ajoutent (on peut en avoir besoin pour désactiver la zone de notification) - model.addPropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SAMPLING_STATUS, modelStatusChanged); + model.addPropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SAMPLING_NOTIFICATION_ZONE_STATUS, modelStatusChanged); model.addPropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SELECTED_ROW, modelSelectedRowChanged); model.addPropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SUMMARY_TEXT, modelSummaryTextChanged); @@ -232,7 +232,7 @@ public class SamplingNotificationZoneHandler implements Closeable { public void close() { listSelectionModel.removeListSelectionListener(listSelectionListener); - model.removePropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SAMPLING_STATUS, modelStatusChanged); + model.removePropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SAMPLING_NOTIFICATION_ZONE_STATUS, modelStatusChanged); model.removePropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SELECTED_ROW, modelSelectedRowChanged); model.removePropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SUMMARY_TEXT, modelSummaryTextChanged); @@ -248,7 +248,7 @@ public class SamplingNotificationZoneHandler implements Closeable { private void stopUsingStatusNotication(String message) { whenCanNotUseSampling(message); - model.removePropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SAMPLING_STATUS, modelStatusChanged); + model.removePropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SAMPLING_NOTIFICATION_ZONE_STATUS, modelStatusChanged); model.removePropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SELECTED_ROW, modelSelectedRowChanged); model.removePropertyChangeListener(SamplingNotificationZoneModel.PROPERTY_SUMMARY_TEXT, modelSummaryTextChanged); diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SamplingNotificationZoneModel.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SamplingNotificationZoneModel.java index 1572e0d..33e0d4d 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SamplingNotificationZoneModel.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SamplingNotificationZoneModel.java @@ -9,32 +9,16 @@ import org.jdesktop.beans.AbstractSerializableBean; */ public class SamplingNotificationZoneModel extends AbstractSerializableBean { - public static final String PROPERTY_SAMPLING_STATUS = "samplingNotificationZoneStatus"; + public static final String PROPERTY_SAMPLING_NOTIFICATION_ZONE_STATUS = "samplingNotificationZoneStatus"; public static final String PROPERTY_SUMMARY_TEXT = "summaryText"; public static final String PROPERTY_SELECTED_ROW = "selectedRow"; - private IndividualObservationBatchRowModel selectedRow; - private SamplingNotificationZoneStatus samplingNotificationZoneStatus; - private String summaryText; - - public SamplingNotificationZoneStatus getSamplingNotificationZoneStatus() { - return samplingNotificationZoneStatus; - } - public void setSamplingNotificationZoneStatus(SamplingNotificationZoneStatus samplingNotificationZoneStatus) { - Object oldValue = getSamplingNotificationZoneStatus(); - this.samplingNotificationZoneStatus = samplingNotificationZoneStatus; - firePropertyChange(PROPERTY_SAMPLING_STATUS, oldValue, samplingNotificationZoneStatus); - } - - public String getSummaryText() { - return summaryText; + firePropertyChange(PROPERTY_SAMPLING_NOTIFICATION_ZONE_STATUS, null /* On force la propagation de l'évènement! */, samplingNotificationZoneStatus); } public void setSummaryText(String summaryText) { - Object oldValue = getSummaryText(); - this.summaryText = summaryText; - firePropertyChange(PROPERTY_SUMMARY_TEXT, oldValue, summaryText); + firePropertyChange(PROPERTY_SUMMARY_TEXT, null /* On force la propagation de l'évènement! */, summaryText); } public void reset() { @@ -44,12 +28,7 @@ public class SamplingNotificationZoneModel extends AbstractSerializableBean { } - public IndividualObservationBatchRowModel getSelectedRow() { - return selectedRow; - } - public void setSelectedRow(IndividualObservationBatchRowModel selectedRow) { - this.selectedRow = selectedRow; firePropertyChange(PROPERTY_SELECTED_ROW, null /* On force la propagation de l'évènement! */, selectedRow); } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.