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

📄 simplerulermaptoolbeaninfo.java~1~

📁 基于JAVA的电子地图程序,包括自定义地力工具制做,地图平台为MAPXTREME4.7.1
💻 JAVA~1~
字号:
/**
* Copyright 2000 MapInfo Corporation
* You are free to use this code in your applications, but you may not
* redistribute the source code without this notice.
*/

import java.beans.*;

public class SimpleRulerMapToolBeanInfo extends SimpleBeanInfo {

	Class beanClass = SimpleRulerMapTool.class;

	String iconColor16x16Filename= "distance.gif";
	String iconColor32x32Filename;
	String iconMono16x16Filename;
	String iconMono32x32Filename;

	
	public SimpleRulerMapToolBeanInfo() {
	}


	public java.awt.Image getIcon(int iconKind) {
		switch (iconKind) {
		case BeanInfo.ICON_COLOR_16x16:
		  return iconColor16x16Filename != null ? loadImage(iconColor16x16Filename) : null;
		case BeanInfo.ICON_COLOR_32x32:
		  return iconColor32x32Filename != null ? loadImage(iconColor32x32Filename) : null;
		case BeanInfo.ICON_MONO_16x16:
		  return iconMono16x16Filename != null ? loadImage(iconMono16x16Filename) : null;
		case BeanInfo.ICON_MONO_32x32:
		  return iconMono32x32Filename != null ? loadImage(iconMono32x32Filename) : null;
		}
		return null;
	}


	public PropertyDescriptor [] getPropertyDescriptors()
	{
		try
		{
			// Enabled
			PropertyDescriptor enabled = new PropertyDescriptor(
			      "Enabled", beanClass, "isEnabled", "setEnabled");
			enabled.setDisplayName("Enabled");
			
			// Selected
			PropertyDescriptor selected = new PropertyDescriptor(
			      "Selected", beanClass, "isSelected", "setSelected");
			selected.setBound(true);
			selected.setConstrained(true);
			selected.setDisplayName("Selected");
		
			// Cursor
			PropertyDescriptor cursor = new PropertyDescriptor(
					"Cursor", beanClass, "getCursor", "setCursor");
			cursor.setDisplayName("Cursor");

			PropertyDescriptor [] pda= {enabled, selected, cursor};
			return pda;
		}
		catch(Exception e)
		{
			return null;
		}
	}
}

⌨️ 快捷键说明

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