?? graphnode.java
字號:
package reg402;
import java.awt.Point;
public class GraphNode {
private int ID; //結點的代號
private static int id = 0;
private Point position; //結點在視圖中的位置
public GraphNode() {
//初始化給圖中結點分配狀態號
ID = this.id++;
position = null;
}
public GraphNode(Point position) {
this();
//設置結點的起始位置
this.position = position;
}
public static void resetID() {
//確定結點的代號
id = 0;
}
public void setPosition(Point position) {
//確定結點在視圖中的位置
this.position = position;
}
public int getID() {
//取得狀態號
return this.ID;
}
public Point getPosition() {
//取得結點位置
return this.position;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -