branch develop updated (24892e0 -> 7c5a4af)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository tutti. See http://git.codelutin.com/tutti.git from 24892e0 refs #6411 use last jaxx version new 7c5a4af refs #6411 should fix it The 1 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 7c5a4af1a6a44dcabd6a83505306ff246f5d3715 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Jan 8 13:50:33 2015 +0100 refs #6411 should fix it Summary of changes: .../computable/ComputableDataEditorHandler.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 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 http://git.codelutin.com/tutti.git commit 7c5a4af1a6a44dcabd6a83505306ff246f5d3715 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Jan 8 13:50:33 2015 +0100 refs #6411 should fix it --- .../computable/ComputableDataEditorHandler.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/computable/ComputableDataEditorHandler.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/computable/ComputableDataEditorHandler.java index 3686b3a..7adb459 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/computable/ComputableDataEditorHandler.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/computable/ComputableDataEditorHandler.java @@ -53,22 +53,23 @@ public class ComputableDataEditorHandler extends NumberEditorHandler { } }; - ComputableData bean = (ComputableData) ui.getModel().getBean(); - if (bean != null) { - bean.addPropertyChangeListener(l); + ComputableData computableData = (ComputableData) ui.getModel().getBean(); + if (computableData != null) { + computableData.addPropertyChangeListener(l); } ui.getModel().addPropertyChangeListener(NumberEditorModel.PROPERTY_BEAN, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { - ComputableData bean = (ComputableData) evt.getOldValue(); - if (bean != null) { - bean.removePropertyChangeListener(ComputableData.PROPERTY_COMPUTED_DATA, l); + ComputableData oldComputableData = (ComputableData) evt.getOldValue(); + if (oldComputableData != null) { + oldComputableData.removePropertyChangeListener(ComputableData.PROPERTY_COMPUTED_DATA, l); } - bean = (ComputableData) evt.getNewValue(); - if (bean != null) { - bean.addPropertyChangeListener(ComputableData.PROPERTY_COMPUTED_DATA, l); + ComputableData newComputableData = (ComputableData) evt.getNewValue(); + if (newComputableData != null) { + newComputableData.removePropertyChangeListener(ComputableData.PROPERTY_COMPUTED_DATA, l); + newComputableData.addPropertyChangeListener(ComputableData.PROPERTY_COMPUTED_DATA, l); } } }); @@ -111,14 +112,13 @@ public class ComputableDataEditorHandler extends NumberEditorHandler { JTextField tf = ui.getTextField(); // if (bean != null && ui.getModel() == null) { //FIXME NumberEditor - if (bean != null) { + if (bean != null && bean.getData() == null) { tf.setFont(TuttiUI.TEXTFIELD_COMPUTED_FONT); tf.setForeground(((ComputableDataEditor) ui).getComputedDataColor()); String modelText; Number computedData = bean.getComputedData(); // if (ui.isUseFloat() && decimalNumber != null && computedData != null) { - //FIXME NumberEditor if (decimalNumber != null && computedData != null) { DecimalFormat decimalFormat = Weights.getDecimalFormat(1, decimalNumber); modelText = decimalFormat.format(computedData); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm