diff options
Diffstat (limited to 'src/jcgp/gui/population/GUINode.java')
-rw-r--r-- | src/jcgp/gui/population/GUINode.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/jcgp/gui/population/GUINode.java b/src/jcgp/gui/population/GUINode.java index 230d167..ee98f22 100644 --- a/src/jcgp/gui/population/GUINode.java +++ b/src/jcgp/gui/population/GUINode.java @@ -37,13 +37,13 @@ public class GUINode extends GUIGene implements GUIMutable, GUIConnection { node.setGUIObject(this); // create the output socket - Circle output = new Circle(Constants.NODE_RADIUS, 0, Constants.SOCKET_RADIUS, Constants.SOCKET_COLOUR); + Circle output = new Circle(Constants.NODE_RADIUS, 0, Constants.SOCKET_RADIUS, Constants.SOCKET_PAINT); output.setStroke(Paint.valueOf("black")); // create input sockets sockets = new Circle[GUI.resources.arity()]; for (int l = 0; l < sockets.length; l++) { - sockets[l] = new Circle(Constants.SOCKET_RADIUS, Constants.SOCKET_COLOUR); + sockets[l] = new Circle(Constants.SOCKET_RADIUS, Constants.SOCKET_PAINT); sockets[l].setStroke(Paint.valueOf("black")); sockets[l].setId(String.valueOf(l)); // relocate them @@ -128,4 +128,12 @@ public class GUINode extends GUIGene implements GUIMutable, GUIConnection { lines[i].setVisible(value); } } + + @Override + public void setLockRecursively(boolean value) { + setLock(value); + for (int i = 0; i < GUI.resources.arity(); i++) { + ((GUIConnection) ((Gene) node.getConnection(i)).getGUIObject()).setLockRecursively(value); + } + } } |