⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ellipse.java

📁 GEF初学者可以用来对照的小例子
💻 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 + -