diff options
Diffstat (limited to 'src/jcgp/gui/population/GUINode.java')
-rw-r--r-- | src/jcgp/gui/population/GUINode.java | 25 |
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; + } } |