2,2c2,2 < * @(#)ConnectionHandle.java 5.2 --- > * @(#)ConnectionHandle.java 3a4,9 > * Project: JHotdraw - a GUI framework for technical drawings > * http://www.jhotdraw.org > * http://jhotdraw.sourceforge.net > * Copyright: © by the original author(s) and all contributors > * License: Lesser GNU Public License (LGPL) > * http://www.opensource.org/licenses/lgpl-license.html 24a31,32 > * > * @version <$CURRENT_VERSION$> 32,32c40,40 < private ConnectionFigure fConnection; --- > private ConnectionFigure myConnection; 56,56c64,64 < fConnection = createConnection(); --- > setConnection(createConnection()); 58a67,67 > getConnection().endPoint(p.x, p.y); 58,58c66,66 < fConnection.startPoint(p.x, p.y); --- > getConnection().startPoint(p.x, p.y); 59,59d66 < fConnection.endPoint(p.x, p.y); 60,60c68,68 < view.drawing().add(fConnection); --- > view.drawing().add(getConnection()); 71,71c79,79 < if (fTarget != null) --- > if (fTarget != null) { 72a81,81 > } 74,74c83,83 < if (fTarget != null) --- > if (fTarget != null) { 76a86,86 > } 79,79c89,89 < if (target != null) --- > if (target != null) { 80a91,91 > } 81,81c92,92 < fConnection.endPoint(p.x, p.y); --- > getConnection().endPoint(p.x, p.y); 91,91c102,102 < fConnection.connectStart(startConnector()); --- > getConnection().connectStart(startConnector()); 91a103,106 > getConnection().connectEnd(target); > getConnection().updateConnection(); > } > else { 92,94d102 < fConnection.connectEnd(target); < fConnection.updateConnection(); < } else 95,95c107,107 < view.drawing().remove(fConnection); --- > view.drawing().remove(getConnection()); 95a108,108 > } 96,96c109,109 < fConnection = null; --- > setConnection(null); 123,123c136,136 < && fConnection.canConnect(owner(), target)) { --- > && getConnection().canConnect(owner(), target)) { 133,133c146,146 < if (!figure.includes(fConnection) && figure.canConnect()) { --- > if (!figure.includes(getConnection()) && figure.canConnect() 134,134c147,147 < if (figure.containsPoint(x, y)) --- > && figure.containsPoint(x, y)) { 155a169,175 > protected void setConnection(ConnectionFigure newConnection) { > myConnection = newConnection; > } > > protected ConnectionFigure getConnection() { > return myConnection; > }