欢迎来到虫虫下载站 | 资源下载 资源专辑 关于我们
虫虫下载站

descriptor.java

PIY(Program It Yourself)是一个基于Java的应用程序开发环境
JAVA
字号:
package piy;

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

/**
* All implemented user components/containers can have a descriptor class to provide various
* pieces of information to PIY.  The classes should not rely on the descriptor
* actually being there though - its an optional extension.
* @author David Vivash
* @version 1.0, 22/11/00
*/
public abstract class Descriptor
{

	/**
	* Used to retrieve the (exact) class that the implementing class
	* is offering details of.
	* @return the supported class object
	*/
	public abstract Class getDescribedClass();

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

	/**
	* Returns the name of the thing being described.  This information is used in the 
	* tooltip when the mouse hovers over the button.
	* @return the name of the thing being described
	*/
	public abstract String getName();

	/**
	* Returns a (brief) description of the thing being descibed.  To be used primarily
	* for actions being described, but has a use for User components too.
	* @return a brief textual description
	*/
	public abstract String getDescription();
}

⌨️ 快捷键说明

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