org.jdesktop.dataset.event
Class TableChangeEvent
java.lang.Object
java.util.EventObject
org.jdesktop.dataset.event.TableChangeEvent
- All Implemented Interfaces:
- java.io.Serializable
public class TableChangeEvent
- extends java.util.EventObject
A TableChangeEvent
is broadcast when a DataTable
is changed--either structurally, or
has data modified. Events are identified by an EventType
enumeration in the class. LOAD_STARTED
and LOAD_COMPLETE
are broadcast at the start and end of a DataTable.load()
, respectively,
while SAVE_STARTED
and SAVE_COMPLETE
notify on DataTable.save()
.
TABLE_CLEARED
is broadcast when a table is cleared out completely.
ROW_ADDED
, ROW_DELETED
and ROW_DISCARDED
are broadcast per-row
for add, delete and discard operations. COLUMN_ADDED
and COLUMN_REMOVED
are broadcast per-column for add or remove operations on columns. To track row status changes, or changes to column values, see
RowChangeEvent
.
TableChangeEvents instances are re-sent to all listeners on a table, and are unmodifiable.
- Author:
- Richard Bair, Patrick Wright
- See Also:
- Serialized Form
Fields inherited from class java.util.EventObject |
source |
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 |
newLoadStartEvent
public static TableChangeEvent newLoadStartEvent(DataTable source)
newLoadCompleteEvent
public static TableChangeEvent newLoadCompleteEvent(DataTable source)
newSaveStartEvent
public static TableChangeEvent newSaveStartEvent(DataTable source)
newSaveCompleteEvent
public static TableChangeEvent newSaveCompleteEvent(DataTable source)
newTableClearedEvent
public static TableChangeEvent newTableClearedEvent(DataTable source)
newColumnAddedEvent
public static TableChangeEvent newColumnAddedEvent(DataTable source,
DataColumn col)
newColumnRemovedEvent
public static TableChangeEvent newColumnRemovedEvent(DataTable source,
DataColumn col)
newRowAddedEvent
public static TableChangeEvent newRowAddedEvent(DataTable source,
DataRow row)
newRowDeletedEvent
public static TableChangeEvent newRowDeletedEvent(DataTable source,
DataRow row)
newRowDiscardedEvent
public static TableChangeEvent newRowDiscardedEvent(DataTable source,
DataRow row)
getEventType
public TableChangeEvent.EventType getEventType()
- Returns the EventType enumerated value for this event, never null.
getRowAffected
public DataRow getRowAffected()
- Returns the DataRow affected by this event, or null if no row was involved.
getColumnAffected
public DataColumn getColumnAffected()
- Returns the DataColumn affected by this event, or null if no column was involved.
Copyright © 2005 Sun Microsystems All Rights Reserved.