📄 dsextendelipse.java
字号:
package drawsmart.itsv.swing;
import drawsmart.itsv.basic.DSEllipse;
import drawsmart.itsv.framework.*;
import java.awt.geom.Rectangle2D;
import java.awt.Color;
import drawsmart.itsv.framework.JDSDesktopface;
import drawsmart.itsv.model.SetupDataModel;
import java.awt.Shape;
/**
* <p>Title: 椭圆类继承椭圆抽象类</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author 崔江
* @version 2.0
*/
public class DSExtendElipse extends DSEllipse
{
private JDSDesktopface jDSDesktopface;
public DSExtendElipse(JDSDesktopface jDSDesktopface)
{
super();
this.jDSDesktopface=jDSDesktopface;
}
public Object cloneComponent() {
DSExtendElipse cloneObject = new DSExtendElipse(jDSDesktopface);
//return cloneObject;
//DSExtendElipse cloneObject=(DSExtendElipse)this.clone();
Rectangle2D rect2D=this.getFrame();
cloneObject.setFrame(rect2D);
Color color=this.getFillColor();
cloneObject.setFillColor(color);
color=this.getFrameColor();
cloneObject.setFrameColor(color);
cloneObject.setTextInfo(this.getTextInfo());
//cloneObject.removeAssociatorAll();
//写入随即值
int id =jDSDesktopface.getRandom();
String sID = Integer.toString(id);
jDSDesktopface.addSetupDataModel(new SetupDataModel(),sID);
cloneObject.setComponentID(sID);
return cloneObject;
}
/**
* 完全克隆
* @return Object
*/
public Object cloneComponentFull() {
DSExtendElipse cloneObject=(DSExtendElipse)this.clone();
return cloneObject;
}
/**
* 获得该组件的范围
* @return Shape
*/
public Shape getShape()
{
return (Shape)this;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -