changeconnectionstarthandle.java
来自「开源(Open Source)项目JHotDraw的文档和源程序」· Java 代码 · 共 61 行
JAVA
61 行
/*
* @(#)ChangeConnectionStartHandle.java 5.2
*
*/
package CH.ifa.draw.standard;
import java.awt.Point;
import CH.ifa.draw.framework.*;
/**
* Handle to reconnect the
* start of a connection to another figure.
*/
public class ChangeConnectionStartHandle extends ChangeConnectionHandle {
/**
* Constructs the connection handle for the given start figure.
*/
public ChangeConnectionStartHandle(Figure owner) {
super(owner);
}
/**
* Gets the start figure of a connection.
*/
protected Connector target() {
return fConnection.start();
}
/**
* Disconnects the start figure.
*/
protected void disconnect() {
fConnection.disconnectStart();
}
/**
* Sets the start of the connection.
*/
protected void connect(Connector c) {
fConnection.connectStart(c);
}
/**
* Sets the start point of the connection.
*/
protected void setPoint(int x, int y) {
fConnection.startPoint(x, y);
}
/**
* Returns the start point of the connection.
*/
public Point locate() {
return fConnection.startPoint();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?