📄 ellipse.java
字号:
package com.dss.moon.gef.model;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
public class Ellipse extends Subject{
protected Point Location = new Point(0,0);
protected Dimension size = new Dimension(0,0);
private Rectangle constraint = new Rectangle(Location,size);
public Point getLocation() {
return Location;
}
public Dimension getSize() {
return size;
}
public void setSize(Dimension s) {
if(size.equals(s))
return;
size = s;
firePropertyChange("size",null,s);
}
public void setLocation(Point p) {
if(Location.equals(p))
return;
Location = p;
firePropertyChange("location",null,p);//��֪Diagram����location�ĸı�
}
public void setConstraint(Rectangle con){
if(constraint.equals(con))
return;
constraint = con;
firePropertyChange("constraint", null, constraint);
}
public Rectangle getConstraint(){
return constraint;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -