?? 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;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -