📄 ellipsefigure.java
字号:
package com.dss.moon.gef.view;
import org.eclipse.draw2d.Ellipse;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.RoundedRectangle;
import org.eclipse.draw2d.geometry.Rectangle;
public class EllipseFigure extends RoundedRectangle{
public void paint(Graphics g){
Rectangle f = Rectangle.SINGLETON;
Rectangle r = getBounds();
f.x = r.x + lineWidth / 2;
f.y = r.y + lineWidth / 2;
f.width = r.width - lineWidth;
f.height = r.height - lineWidth;
g.drawRoundRectangle(f, 10, 10);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -