home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-18 | 1.7 KB | 53 lines |
- /*
- * @(#DataItemChangedEvent.java
- *
- * Copyright (c) 1997 Symantec Corporation. All Rights Reserved.
- *
- */
-
- //A DataItem sends one of these events to all DataItemChangedListeners that have registered on its
- //addDataItemChangedListener method, whenever its data is modified. The DataItemChangedEvent includes two fields:
-
- // - source -- the DataItem whose data changed
-
- // - changeType -- an indication of the type of modification, including value change, or size change (e.g. array size). The
- // allowed values are:
-
- // DATA_SIZE_CHANGE
- // Indicates that the size of a DataItem has changed, for example, that an ArrayAccess now has more or less data
-
- // DATA_VALUE_CHANGE
- // Indicates that data has changed in value but that the navigational structure remained constant.
-
- // DATA_DELETED
- // Indicates that the source DataItem is being deleted by its producer.
-
- package symantec.itools.db.beans.binding.databus;
-
-
- public class DataItemChangedEvent extends java.util.EventObject
- {
- public static final int DATA_SIZE_CHANGE=0;
- public static final int DATA_VALUE_CHANGE=1;
- public static final int DATA_DELETED=2;
-
- int cT;
-
- //Constructs a DataItemChangedEvent of a given change type.
- public DataItemChangedEvent(int changeType, Object source) throws InvalidType
- {
- super(source);
- if ((changeType < DATA_SIZE_CHANGE) || ( changeType > DATA_DELETED))
- throw new InvalidType();
- else
- cT=changeType;
- }
-
-
-
- //Returns the type of change that caused this event.
- public int getChangeType()
- {
- return cT;
- }
- }