|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject com.pcauto.gui.table.EntityListEvent
EntityListEvent is used to notify listeners that an EntityList has
changed. The entity list event can be used to specify an INSERTED,
DELETED, or MODIFIED event. The accessor methods can be used to
retrieve information about the event such as the first and last
entity that the event applies to. Moving an entity requires two
events. It must be both DELETED and then INSERTED.
Depending on the parameters used in the constructors,
the EntityListEvent can be used to specify the following types
of changes:
EntityListEvent(source) //all data has changed EntityListEvent(source, 5) //the entity at position 5 has changed. This is actually entity 6. EntityListEvent(source,1,EntityListEvent.INSERTED) //the entity at postion 1 has just been inserted. EntityListEvent(source, 3, EntityListEvent.DELETED) //entity 3 was deleted EntityListEvent(source,0,2,EntityListEvent.MODIFIED) //the first 3 entities have changed.
Field Summary | |
static int |
DELETED
Identifies the removal of data from the table. |
static int |
INSERTED
Identifies the addition of new data to the table. |
static int |
MODIFIED
Identifies the modification of table data. |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary | |
EntityListEvent(java.lang.Object source)
Constructs a new EntityListEvent that initially occurred on the specified object. |
|
EntityListEvent(java.lang.Object source,
int index)
Constructs a new EntityListEvent where the entity at the specified index has changed. |
|
EntityListEvent(java.lang.Object source,
int index,
int event)
Constructs a new EntityListEvent where the entity at the specified index had the specified event performed on it. |
|
EntityListEvent(java.lang.Object source,
int startIndex,
int endIndex,
int event)
Constructs a new EntityListEvent where the entities between the specified indices(inclusive) had the specified event performed on them. |
Method Summary | |
int |
getFirstEntity()
Returns the first entity that changed. |
int |
getLastEntity()
Returns the last entity that changed. |
int |
getType()
Returns the type of event - one of: DELETED, INSERTED, and MODIFIED. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int INSERTED
public static final int DELETED
public static final int MODIFIED
Constructor Detail |
public EntityListEvent(java.lang.Object source)
EntityList
upon which the event occurred.
source
- the object on which the event initially occurredpublic EntityListEvent(java.lang.Object source, int index)
EntityList
upon which the event occurred.
source
- the object on which the event initially occurredindex
- the index of the entity that has changedpublic EntityListEvent(java.lang.Object source, int index, int event)
EntityList
upon which the event occurred.
source
- the object on which the event initially occurredindex
- the index of the entity that changedevent
- the event that occurredpublic EntityListEvent(java.lang.Object source, int startIndex, int endIndex, int event)
EntityList
upon which the event occurred.
source
- the object on which the event initially occurredstartIndex
- the index of the first entity for which the
event appliesendIndex
- the index of the last entity
for which the event appliesevent
- the event that occurredMethod Detail |
public int getFirstEntity()
public int getLastEntity()
public int getType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |