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

📄 propertynode.java

📁 java 调用windows的api
💻 JAVA
字号:
package org.jawin.browser.data;

import org.jawin.browser.project.ProjectItem;
import org.jawin.browser.image.ImageManager;
import javax.swing.ImageIcon;
import org.jawin.browser.xml.Encoder;
import org.jawin.browser.codegen.TypeConversionConfig;

/**
 * The property of a type info
 *
 * <p>Title: Jawin Code Generation GUI</p>
 * <p>Description: GUI for exploring type libraries and generating Java code</p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: Open Source Incentive</p>
 *
 * @author Josh Passenger
 * @version 1.0
 */

public class PropertyNode extends BaseData
{
	private static ImageIcon ICON = ImageManager.getInstance().getImage("images/property.png");

	protected String description = null;
	protected int type = 0;
	protected TypeConversionConfig config = null;
	protected String typeName = null;
	protected String propertyKind = null;

	public PropertyNode(String newName, String newDescription, int newType)
	{
		super(newName, null);
		description = newDescription;
		type = newType;
	}

	public void setTypeConfig(TypeConversionConfig newConfig)
	{
		config = newConfig;
	}

	public void setTypeName(String newTypeName)
	{
		typeName = newTypeName;
	}

	public void setPropertyKind(String newPropertyKind)
	{
		propertyKind = newPropertyKind;
	}

	public ImageIcon getIcon()
	{
		return ICON;
	}

	public String toString()
	{
		return name;
	}

	public void toXML(int depth, StringBuffer buffer)
	{
		indent(depth, buffer);
		buffer.append("<property name=\"");
		Encoder.encode(name, buffer);
		buffer.append("\" description=\"");
		Encoder.encode(description, buffer);
		buffer.append("\" type=\"");
		buffer.append(type);
		buffer.append("\" typeName=\"");
		Encoder.encode(typeName, buffer);
		buffer.append("\" kind=\"");
		Encoder.encode(propertyKind, buffer);
		buffer.append("\"");

		if (config != null)
		{
			config.toXML(buffer);
		}

		buffer.append(">");
		newline(buffer);

		for (int i = 0; i < getChildCount(); i++)
		{
			getBaseDataAt(i).toXML(depth + 1, buffer);
		}

		indent(depth, buffer);
		buffer.append("</property>");
		newline(buffer);
	}
}

⌨️ 快捷键说明

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