aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/gui/population/GUINode.java
diff options
context:
space:
mode:
authorEduardo Pedroni <ep625@york.ac.uk>2014-05-04 19:23:52 +0100
committerEduardo Pedroni <ep625@york.ac.uk>2014-05-04 19:23:52 +0100
commitaa9e74e7f67789f6353fc26e02ee8e68e40609a2 (patch)
tree3ad4ed8a0717a9983775a38b0cc8d9a10c01302a /src/jcgp/gui/population/GUINode.java
parentc4fc7e307caf03c93c4203aff8960ffcb3ca8737 (diff)
Added more comments, minor refactorings
Diffstat (limited to 'src/jcgp/gui/population/GUINode.java')
-rw-r--r--src/jcgp/gui/population/GUINode.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/jcgp/gui/population/GUINode.java b/src/jcgp/gui/population/GUINode.java
index 731db8f..6dfeaa4 100644
--- a/src/jcgp/gui/population/GUINode.java
+++ b/src/jcgp/gui/population/GUINode.java
@@ -319,7 +319,7 @@ public class GUINode extends GUIGene {
return true;
} else if (target instanceof GUINode) {
// target and source are nodes, let's look at levels back
- Node t = ((GUINode) target).getGene(), s = ((GUINode) source).getGene();
+ Node t = ((GUINode) target).getNode(), s = ((GUINode) source).getNode();
if (s.getColumn() - t.getColumn() > 0 && s.getColumn() - t.getColumn() <= resources.levelsBack()) {
return true;
}
@@ -344,6 +344,10 @@ public class GUINode extends GUIGene {
}
+ public Node getNode() {
+ return node;
+ }
+
/**
* Place the end of the specified line on the output of the associated connection.
*
@@ -384,12 +388,6 @@ public class GUINode extends GUIGene {
}
@Override
- public Node getGene() {
- return node;
- }
-
-
- @Override
public void setConnections(GUIGeneState newState) {
for (int i = 0; i < lines.length; i++) {
parent.getGuiGene(node.getConnection(i)).setState(newState);