From 8189116ea4b5db4675e31dfd04a5687d55e29262 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Tue, 6 May 2014 14:29:37 +0100 Subject: Added javadocs, made minor changes to the comments --- src/jcgp/gui/population/GUINode.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/jcgp/gui/population/GUINode.java') diff --git a/src/jcgp/gui/population/GUINode.java b/src/jcgp/gui/population/GUINode.java index 6dfeaa4..d3ae27f 100644 --- a/src/jcgp/gui/population/GUINode.java +++ b/src/jcgp/gui/population/GUINode.java @@ -398,7 +398,8 @@ public class GUINode extends GUIGene { public void setChangingConnection(Connection newConnection) { node.setConnection(connectionIndex, newConnection); if (parent.isEvaluating()) { - parent.evaluate(node.getColumn()); + parent.updateValues(); +// parent.evaluate(node.getColumn()); } } @@ -452,24 +453,23 @@ public class GUINode extends GUIGene { public void updateText() { if (parent.isEvaluating()) { - text.setText(node.getFunction() + "\n" + value.toString()); + text.setText(node.getFunction() + "\n" + node.getValue().toString()); } else { text.setText(node.getFunction().toString()); } } - - public void calculate() { - value = node.getValue(); - } public void setFunction(Function function) { node.setFunction(function); if (parent.isEvaluating()) { - calculate(); - parent.evaluate(node.getColumn()); +// parent.evaluate(node.getColumn()); + parent.updateValues(); } else { updateText(); } - + } + + public void setNode(Node newNode) { + node = newNode; } } -- cgit v1.2.3