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

📄 antcanvas.java

📁 Java项目开发与毕业设计指导 朱福喜, 黄昊编著 清华大学出版社 项目2
💻 JAVA
字号:
package ant;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;

/** 画布类
 * @author Leaf
 */
public class AntCanvas extends Canvas {
	public final GC gc = new GC(this);
	public final Color
		WHITE = gc.getDevice().getSystemColor(SWT.COLOR_WHITE),
		CYAN = gc.getDevice().getSystemColor(SWT.COLOR_CYAN),
		RED = gc.getDevice().getSystemColor(SWT.COLOR_RED),
		GREEN = gc.getDevice().getSystemColor(SWT.COLOR_GREEN),
		BLUE = gc.getDevice().getSystemColor(SWT.COLOR_BLUE),
		YELLOW = gc.getDevice().getSystemColor(SWT.COLOR_YELLOW),
		BLACK = gc.getDevice().getSystemColor(SWT.COLOR_BLACK);

	/** 
	 * 构造器
	 * @param parent 父容器
	 * @param style 样式
	 */
	public AntCanvas(Composite parent, int style) {
		super(parent, style);
	}

	/** 重置画布 */
	public void reset() {
		
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -