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

📄 collectionevent.java

📁 本程序是有IBM开发的一个基于数据表格的组件,里面有相关的例子和DOC,本站资料仅为大家学习之用
💻 JAVA
字号:

package com.ibm.j2x.event;

import java.util.Collection;
import java.util.EventObject;

import com.ibm.j2x.util.collection.ObservableCollection;

/**
 * The CollectionEvent provides information on an ObservableCollection object
 * when it has been modified.
 * @author MAbernethy
 */
public class CollectionEvent extends EventObject
{
	/** The constant for an object added */
	public static final int ADD = 0;
	/** The constant for an object removed */
	public static final int REMOVE = 1;
	/** The constant for an object modified */
	public static final int MODIFY = 2;
	
	private int type;
	
	/**
	 * Creates a CollectionEvent
	 * @param source the ObservableCollection that threw the event
	 * @param type the type of event
	 */
	public CollectionEvent(ObservableCollection source, int type)
	{
		super(source);
		this.type = type;
	}

	/**
	 * Gets the event type
	 * @return either ADD, REMOVE, or MODIFY
	 */
	public int getType()
	{
		return type;
	}

}

⌨️ 快捷键说明

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