constantdescriptor.java

来自「PIY(Program It Yourself)是一个基于Java的应用程序开发」· Java 代码 · 共 42 行

JAVA
42
字号
package piy.comparator;

import java.io.File;
import java.awt.Image;
import javax.swing.ImageIcon;
import piy.ActionDescriptor;

/**
* Describes the Constant comparator, returns true or false.
* @author David Vivash
* @version 1.0, 2/05/01
*/
public class ConstantDescriptor extends ActionDescriptor
{
	public Class getDescribedClass() { return ConstantComparator.class; }

	public String getName() { return "Constant"; }

	public String getDescription() { return "Returns yes or no"; }

	public String getCategory() {
		return "General";
	}

	/**
	* Returns the (40x40) icon that should be displayed in the boolean expression window.
	* @return the (large) image of the if action
	*/
	public ImageIcon getBigIcon() {
		String sep = File.separator;
		return new ImageIcon("piy" + sep + "comparator" + sep + "constant.gif");
	}

	/*
	* Returns the (24x24) icon that should be displayed on the PIY toolbar.
	* @return the image of the if action
	*/
	public Image getIcon() {
		String sep = File.separator;
		return new ImageIcon("piy" + sep + "comparator" + sep + "smallconstant.gif").getImage();
	}
}

⌨️ 快捷键说明

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