nl.knowledgeplaza.util.collection
Class CollectionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by nl.knowledgeplaza.util.collection.CollectionEvent
All Implemented Interfaces:
java.io.Serializable

public class CollectionEvent
extends java.util.EventObject

The CollectionEvent provides information on an ObservableCollection object when it has been modified.

See Also:
Serialized Form

Field Summary
static int ADD
          The constant for an object added
static int MODIFY
          The constant for an object modified
static int REMOVE
          The constant for an object removed
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CollectionEvent(ObservableCollection source, int type)
          Creates a CollectionEvent
CollectionEvent(ObservableCollection source, int type, java.lang.Object value)
          Creates a CollectionEvent
CollectionEvent(ObservableCollection source, int type, java.lang.Object value, java.lang.Object originalValue)
          Creates a CollectionEvent
 
Method Summary
 java.lang.Object getOriginalValue()
          Gets the value that was modified (only relevant on MODIFY)
 int getType()
          Gets the event type
 java.lang.Object getValue()
          Gets the value that is added / removed
 
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

ADD

public static final int ADD
The constant for an object added

See Also:
Constant Field Values

REMOVE

public static final int REMOVE
The constant for an object removed

See Also:
Constant Field Values

MODIFY

public static final int MODIFY
The constant for an object modified

See Also:
Constant Field Values
Constructor Detail

CollectionEvent

public CollectionEvent(ObservableCollection source,
                       int type)
Creates a CollectionEvent

Parameters:
source - the ObservableCollection that threw the event
type - the type of event

CollectionEvent

public CollectionEvent(ObservableCollection source,
                       int type,
                       java.lang.Object value)
Creates a CollectionEvent

Parameters:
source - the ObservableCollection that threw the event
type - the type of event
value - the value that is added / removed

CollectionEvent

public CollectionEvent(ObservableCollection source,
                       int type,
                       java.lang.Object value,
                       java.lang.Object originalValue)
Creates a CollectionEvent

Parameters:
source - the ObservableCollection that threw the event
type - the type of event
value - the value that is added / removed
Method Detail

getType

public int getType()
Gets the event type

Returns:
either ADD, REMOVE, or MODIFY

getValue

public java.lang.Object getValue()
Gets the value that is added / removed

Returns:
value

getOriginalValue

public java.lang.Object getOriginalValue()
Gets the value that was modified (only relevant on MODIFY)

Returns:
value


Copyright © 2010. All Rights Reserved.