com.sap.tc.cmi.util

Class CMIObservableListEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycom.sap.tc.cmi.util.CMIObservableListEvent
All Implemented Interfaces:
Serializable

public class CMIObservableListEvent
extends 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.

See Also:
Serialized Form

Type Classification Type Classification:

This class is part of the Common Model Interface and is intended to be subclassed by applications.


Field Summary
static int CONTIGUOUS_ELEMENTS_ADDED
          Event type when multiple elements have been added en block.
static int CONTIGUOUS_ELEMENTS_REMOVED
          Event type when multiple elements have been removed en block.
static int ELEMENT_ADDED
          Event type when a single element has been added.
static int ELEMENT_CHANGED
          Event type used when a single element has been changed.
static int ELEMENT_REMOVED
          Event type used when a single element has been removed.
static int LIST_CLEARED
          Event type when list has been cleared.
static int MULTIPLE_ELEMENTS_REMOVED
          Event type when multiple elements have been removed at not necessarily contiguous positions.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CMIObservableListEvent(ICMIObservableList source)
          Constructor for CMIObservableListEvent.
CMIObservableListEvent(ICMIObservableList source, int type, Object element, int fromIndex, int toIndex)
          Creates an event object with the given type and parameters for the given source.
 
Method Summary
 int getChangeType()
           
 Object getElement()
           
 int getFromIndex()
           
 ICMIObservableList getObservableList()
           
 int getToIndex()
           
 
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

LIST_CLEARED

public static final int LIST_CLEARED
Event type when list has been cleared. Event Object will contain no further useful data.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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).

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values
Constructor Detail

CMIObservableListEvent

public CMIObservableListEvent(ICMIObservableList source)
Constructor for CMIObservableListEvent.

Parameters:
source -

CMIObservableListEvent

public CMIObservableListEvent(ICMIObservableList source,
                              int type,
                              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.

Method Detail

getObservableList

public final ICMIObservableList getObservableList()

getFromIndex

public final int getFromIndex()

getToIndex

public final int getToIndex()

getChangeType

public final int getChangeType()

getElement

public final Object getElement()


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.