com.sap.tc.cmi.util
Class CMIObservableListEvent
java.lang.Object
|
+--java.util.EventObject
|
+--com.sap.tc.cmi.util.CMIObservableListEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class CMIObservableListEvent
- extends java.util.EventObject
Event object that describes changes in an ICMIObservableList.
This type can be called by applications or frameworks using CMI and
implementations of CMI can (but usually have not to) subclass it.
- Version:
- $Id: //tc/CommonModelInterface/630_VAL_REL/src/_cmi_api/java/com/sap/tc/cmi/util/CMIObservableListEvent.java#1 $
- 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 |
LIST_CLEARED
public static final int LIST_CLEARED
- Event type when list has been cleared.
Event Object will contain no further useful data.
ELEMENT_ADDED
public static final int ELEMENT_ADDED
- Event type when a single element has been added.
Event Object contains the added element, the index where
the element has been added (fromIndex == toIndex).
Implies an index increment by 1 for any existing element
after the insert position.
ELEMENT_CHANGED
public static final int ELEMENT_CHANGED
- Event type used when a single element has been changed.
Event Object contains the old element, the index where
the element has been changed (fromIndex == toIndex).
ELEMENT_REMOVED
public static final int ELEMENT_REMOVED
- Event type used when a single element has been removed.
Event Object contains the old element, the index where
the element has been removed (fromIndex == toIndex).
Implies an index decrement by 1 for any existing element
after the remove position.
CONTIGUOUS_ELEMENTS_ADDED
public static final int CONTIGUOUS_ELEMENTS_ADDED
- Event type when multiple elements have been added en block.
Event Object contains the index of the first and the last inserted
element.
Implies an index increment by toIndex-fromIndex+1 for any existing element
after the insert position.
CONTIGUOUS_ELEMENTS_REMOVED
public static final int CONTIGUOUS_ELEMENTS_REMOVED
- Event type when multiple elements have been removed en block.
Event Object contains the index of the first and the last removed
element.
Implies an index decrement by toIndex-fromIndex+1 for any existing element
after the insert position.
MULTIPLE_ELEMENTS_REMOVED
public static final int MULTIPLE_ELEMENTS_REMOVED
- Event type when multiple elements have been removed at not necessarily contiguous positions.
Event Object contains no more information.
Implies index changes for any existing element after the first remove position.
CMIObservableListEvent
public CMIObservableListEvent(ICMIObservableList source)
- Constructor for CMIObservableListEvent.
- Parameters:
source -
CMIObservableListEvent
public CMIObservableListEvent(ICMIObservableList source,
int type,
java.lang.Object element,
int fromIndex,
int toIndex)
- Creates an event object with the given type and parameters for the given source.
source must not be null and type must be one of the event
types defined in this class. Whether the other parameters have to be set, depends on the event
types and is documented with these types.
This constructor can be called by implementations that use CMIObservableListEvent as it is
as well as by implementations that have to subclass it.
getObservableList
public final ICMIObservableList getObservableList()
getFromIndex
public final int getFromIndex()
getToIndex
public final int getToIndex()
getChangeType
public final int getChangeType()
getElement
public final java.lang.Object getElement()
Copyright © 2002 SAP AG. Automatically generated Thu Mar 3 2005, 21:53