borland Packages Class Hierarchy dx.dataset Package
java.lang.Object +----java.util.EventObject +----com.borland.jb.util.DispatchableEvent +----com.borland.dx.dataset.DataChangeEvent
Variables Constructors Properties Methods
Implements ExceptionDispatch, Serializable
The DataChangeEvent
is the internal event generated when the data in a
DataSet
is changed. It is passed to DataSet
components and listeners of
the DataSet
. The event ID (see the ID
property) indicates the type
of data update. Other members
provide additional information on the change of the data.
The dbSwing components contain some examples for using the DataChangeEvent
class.
The DataChangeEvent
class may be useful
for component writers, however, is not recommended for general usage.
The DataChangeListener
responds to the DataChangeEvent
class.
public static final int DATA_CHANGED = 5More than one row of data has changed.
public static final int POST_ROW = 6Notification to listeners that a row is posting. This allows a listener to post unposted field values just before the row is going to be posted.
public static final int ROW_ADDED = 1A row was added. Use
getRowAffected()
to get the new row position.
public static final int ROW_CHANGE_POSTED = 4A row was changed and posted. Use
getRowAffected()
to get the new row position.
public static final int ROW_CHANGED = 3Only a cell changed, row did not post. Use
getRowAffected()
to get the new row position.
public static final int ROW_DELETED = 2A row was deleted. Row member has new row position. Use
getRowAffected()
to get the new row position.
public DataChangeEvent(Object source, int id)Constructs a
DataChangeEvent
object.
public DataChangeEvent(Object source, int id, int affectedRow)Constructs a
DataChangeEvent
object.
public final int getID()Read-only property that indicates the type of data change. Return values for this property are constants defined in this class.
public final int getRowAffected()Read-only property that returns the row affected by the data change. If the
multiRowChange
property is false, this property returns
the row affected. Otherwise, it returns -1.
public void dispatch(EventListener listener)This method is used internally by other
com.borland
classes.
You should never use this method directly.
public final boolean multiRowChange()Specifies whether data in more than one row is affected. Useful for repaint strategies.
public String toString()
Returns the concatenation of super.toString
and the value of the ID
property.