diff options
author | Eduardo Pedroni <e.pedroni91@gmail.com> | 2014-11-24 16:29:06 +0000 |
---|---|---|
committer | Eduardo Pedroni <e.pedroni91@gmail.com> | 2014-11-24 16:29:06 +0000 |
commit | db2bc6e935ff1632d78ea8a03606b396944ef21e (patch) | |
tree | d87321375f8c3f830976dba63054eaea29fa6efe /src/jcgp/gui/constants | |
parent | a00b13c12e6fd9f91ee156d5db96e02853d2e410 (diff) |
Added partial support for connection manipulation, now using a static storage class for targetting.
Diffstat (limited to 'src/jcgp/gui/constants')
-rw-r--r-- | src/jcgp/gui/constants/Position.java | 8 |
1 files changed, 4 insertions, 4 deletions
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()); } /** |