From db2bc6e935ff1632d78ea8a03606b396944ef21e Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Mon, 24 Nov 2014 16:29:06 +0000 Subject: Added partial support for connection manipulation, now using a static storage class for targetting. --- src/jcgp/gui/constants/Position.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/jcgp/gui/constants') diff --git a/src/jcgp/gui/constants/Position.java b/src/jcgp/gui/constants/Position.java index cba5373..6d4e02b 100644 --- a/src/jcgp/gui/constants/Position.java +++ b/src/jcgp/gui/constants/Position.java @@ -51,8 +51,8 @@ public final class Position { // use the offset and the socket positions to connect the lines for (int i = 0; i < GUI.resources.arity(); i++) { - node.getLine(i).setStartX(node.getSocket(i).getCenterX() + xOffset + Constants.NODE_RADIUS + Constants.SOCKET_RADIUS); - node.getLine(i).setStartY(node.getSocket(i).getCenterY() + yOffset + Constants.NODE_RADIUS); + node.getLines()[i].setStartX(node.getSocket(i).getCenterX() + xOffset + Constants.NODE_RADIUS + Constants.SOCKET_RADIUS); + node.getLines()[i].setStartY(node.getSocket(i).getCenterY() + yOffset + Constants.NODE_RADIUS); } } @@ -67,8 +67,8 @@ public final class Position { // the output's position is a function of the number of columns and its own index output.relocate(((GUI.resources.columns() + 1) * (2 * Constants.NODE_RADIUS + Constants.SPACING)) + Constants.CHROMOSOME_PANE_MARGIN, output.getOutput().getIndex() * (2 * Constants.NODE_RADIUS + Constants.SPACING) + Constants.CHROMOSOME_PANE_MARGIN); - output.getLine().setStartX(output.getLayoutX() - Constants.NODE_RADIUS); - output.getLine().setStartY(output.getLayoutY()); + output.getLines()[0].setStartX(output.getLayoutX() - Constants.NODE_RADIUS); + output.getLines()[0].setStartY(output.getLayoutY()); } /** -- cgit v1.2.3