📄 node.java
字号:
package toocom.ocgl;
/**
* This class represents a node (in a graph or an axiom for example). It extends the
* class NamedGraphicalObject, with velocity atributes added (dx, dy) to implement the
* force directed algorith. Another attribute determines if the node is fixed, which
* means that the node is currently being moved by the user and mustn't be moved by
* the force directed algorithm.
*
* @author Nicolas Roy
* @author Matthieu Legall
* @author Dounia K閐a
*/
public abstract class Node extends NamedGraphicalObject {
public double dx;
public double dy;
private boolean fixed;
public Node(Terms terms,int x, int y){
super(terms, x, y);
this.fixed=false;
}
public Node(Terms terms){
super(terms);
this.fixed=false;
this.dx = 0;
this.dy = 0;
}
public void setFixed(boolean f){
this.fixed=f;
}
public boolean fixed(){
return this.fixed;
}
public abstract ConceptualPrimitive getType();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -