📄 collectionevent.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 + -