2c2 < * @(#)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$> 32c40 < private ConnectionFigure fConnection; --- > private ConnectionFigure myConnection; 56c64 < fConnection = createConnection(); --- > setConnection(createConnection()); 58,60c66,68 < fConnection.startPoint(p.x, p.y); < fConnection.endPoint(p.x, p.y); < view.drawing().add(fConnection); --- > getConnection().startPoint(p.x, p.y); > getConnection().endPoint(p.x, p.y); > view.drawing().add(getConnection()); 71c79 < if (fTarget != null) --- > if (fTarget != null) { 72a81 > } 74c83 < if (fTarget != null) --- > if (fTarget != null) { 76a86 > } 79c89 < if (target != null) --- > if (target != null) { 81c91,92 < fConnection.endPoint(p.x, p.y); --- > } > getConnection().endPoint(p.x, p.y); 91,96c102,109 < fConnection.connectStart(startConnector()); < fConnection.connectEnd(target); < fConnection.updateConnection(); < } else < view.drawing().remove(fConnection); < fConnection = null; --- > getConnection().connectStart(startConnector()); > getConnection().connectEnd(target); > getConnection().updateConnection(); > } > else { > view.drawing().remove(getConnection()); > } > setConnection(null); 123c136 < && fConnection.canConnect(owner(), target)) { --- > && getConnection().canConnect(owner(), target)) { 133,134c146,147 < if (!figure.includes(fConnection) && figure.canConnect()) { < if (figure.containsPoint(x, y)) --- > if (!figure.includes(getConnection()) && figure.canConnect() > && figure.containsPoint(x, y)) { 155a169,175 > protected void setConnection(ConnectionFigure newConnection) { > myConnection = newConnection; > } > > protected ConnectionFigure getConnection() { > return myConnection; > }