aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/gui/population/GUINode.java
diff options
context:
space:
mode:
authorEduardo Pedroni <e.pedroni91@gmail.com>2014-11-24 16:29:06 +0000
committerEduardo Pedroni <e.pedroni91@gmail.com>2014-11-24 16:29:06 +0000
commitdb2bc6e935ff1632d78ea8a03606b396944ef21e (patch)
treed87321375f8c3f830976dba63054eaea29fa6efe /src/jcgp/gui/population/GUINode.java
parenta00b13c12e6fd9f91ee156d5db96e02853d2e410 (diff)
Added partial support for connection manipulation, now using a static storage class for targetting.
Diffstat (limited to 'src/jcgp/gui/population/GUINode.java')
-rw-r--r--src/jcgp/gui/population/GUINode.java25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/jcgp/gui/population/GUINode.java b/src/jcgp/gui/population/GUINode.java
index ee98f22..1a32426 100644
--- a/src/jcgp/gui/population/GUINode.java
+++ b/src/jcgp/gui/population/GUINode.java
@@ -76,21 +76,7 @@ public class GUINode extends GUIGene implements GUIMutable, GUIConnection {
this.node = node;
}
- /**
- * Returns one of this object's connection lines. Lines are
- * indexed in the same order as sockets and the connections
- * they represent.
- *
- * @param index the line to return.
- * @return the indexed line object.
- */
- public Line getLine(int index) {
- return lines[index];
- }
-
- /**
- * @return the entire {@code Line} array.
- */
+ @Override
public Line[] getLines() {
return lines;
}
@@ -136,4 +122,13 @@ public class GUINode extends GUIGene implements GUIMutable, GUIConnection {
((GUIConnection) ((Gene) node.getConnection(i)).getGUIObject()).setLockRecursively(value);
}
}
+
+ @Override
+ public GUIConnection[] getConnections() {
+ GUIConnection[] connections = new GUIConnection[GUI.resources.arity()];
+ for (int c = 0; c < connections.length; c++) {
+ connections[c] = (GUIConnection) ((Gene) node.getConnection(c)).getGUIObject();
+ }
+ return connections;
+ }
}