aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/gui/population
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
parentc4fc7e307caf03c93c4203aff8960ffcb3ca8737 (diff)
Added more comments, minor refactorings
Diffstat (limited to 'src/jcgp/gui/population')
-rw-r--r--src/jcgp/gui/population/GUIGene.java3
-rw-r--r--src/jcgp/gui/population/GUIInput.java5
-rw-r--r--src/jcgp/gui/population/GUINode.java12
-rw-r--r--src/jcgp/gui/population/GUIOutput.java5
4 files changed, 5 insertions, 20 deletions
diff --git a/src/jcgp/gui/population/GUIGene.java b/src/jcgp/gui/population/GUIGene.java
index c41261d..3ace150 100644
--- a/src/jcgp/gui/population/GUIGene.java
+++ b/src/jcgp/gui/population/GUIGene.java
@@ -8,7 +8,6 @@ import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.scene.text.TextAlignment;
import jcgp.backend.population.Connection;
-import jcgp.backend.population.Gene;
public abstract class GUIGene extends Group {
@@ -83,8 +82,6 @@ public abstract class GUIGene extends Group {
public abstract void updateLines();
- public abstract Gene getGene();
-
public abstract void setChangingConnection(Connection newConnection);
public abstract Connection getChangingConnection();
diff --git a/src/jcgp/gui/population/GUIInput.java b/src/jcgp/gui/population/GUIInput.java
index 065c125..05372c4 100644
--- a/src/jcgp/gui/population/GUIInput.java
+++ b/src/jcgp/gui/population/GUIInput.java
@@ -165,11 +165,6 @@ public class GUIInput extends GUIGene {
}
- @Override
- public Input getGene() {
- return input;
- }
-
/**
* Set all connections to a given state.
*
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);
diff --git a/src/jcgp/gui/population/GUIOutput.java b/src/jcgp/gui/population/GUIOutput.java
index 79159b9..29752cd 100644
--- a/src/jcgp/gui/population/GUIOutput.java
+++ b/src/jcgp/gui/population/GUIOutput.java
@@ -240,11 +240,6 @@ public class GUIOutput extends GUIGene {
}
@Override
- public Output getGene() {
- return output;
- }
-
- @Override
public void setConnections(GUIGeneState newState) {
parent.getGuiGene(output.getSource()).setState(newState);
}