From aa9e74e7f67789f6353fc26e02ee8e68e40609a2 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Sun, 4 May 2014 19:23:52 +0100 Subject: Added more comments, minor refactorings --- src/jcgp/gui/population/GUIGene.java | 3 --- src/jcgp/gui/population/GUIInput.java | 5 ----- src/jcgp/gui/population/GUINode.java | 12 +++++------- src/jcgp/gui/population/GUIOutput.java | 5 ----- 4 files changed, 5 insertions(+), 20 deletions(-) (limited to 'src/jcgp/gui/population') 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. * @@ -383,12 +387,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++) { 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 @@ -239,11 +239,6 @@ public class GUIOutput extends GUIGene { } } - @Override - public Output getGene() { - return output; - } - @Override public void setConnections(GUIGeneState newState) { parent.getGuiGene(output.getSource()).setState(newState); -- cgit v1.2.3