nl.knowledgeplaza.util.collection
Class CollectionEvent<T>

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

public class CollectionEvent<T>
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 ABOUT_TO_ADD
          The constant for an object about to be remove
static int ABOUT_TO_REMOVE
          The constant for an object about to be remove
static int ADDED
          The constant for an object added
static int MODIFIED
          The constant for an object modified
static int REMOVED
          The constant for an object removed
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CollectionEvent(ObservableCollection<T> source, int type)
          Creates a CollectionEvent
CollectionEvent(ObservableCollection source, int type, java.util.Collection<T> value)
          Creates a CollectionEvent
CollectionEvent(ObservableCollection source, int type, java.util.Collection<T> value, java.util.Collection<T> originalValue)
          Creates a CollectionEvent
CollectionEvent(ObservableCollection source, int type, T value)
          Creates a CollectionEvent
CollectionEvent(ObservableCollection source, int type, T value, T originalValue)
          Creates a CollectionEvent
 
Method Summary
 java.util.Collection<T> getOriginalValue()
          Gets the value that was modified (only relevant on MODIFY)
 int getType()
          Gets the event type
 java.util.Collection<T> 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

ADDED

public static final int ADDED
The constant for an object added

See Also:
Constant Field Values

REMOVED

public static final int REMOVED
The constant for an object removed

See Also:
Constant Field Values

MODIFIED

public static final int MODIFIED
The constant for an object modified

See Also:
Constant Field Values

ABOUT_TO_ADD

public static final int ABOUT_TO_ADD
The constant for an object about to be remove

See Also:
Constant Field Values

ABOUT_TO_REMOVE

public static final int ABOUT_TO_REMOVE
The constant for an object about to be remove

See Also:
Constant Field Values
Constructor Detail

CollectionEvent

public CollectionEvent(ObservableCollection<T> 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,
                       T 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.util.Collection<T> 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,
                       T value,
                       T originalValue)
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.util.Collection<T> value,
                       java.util.Collection<T> 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.util.Collection<T> getValue()
Gets the value that is added / removed

Returns:
value

getOriginalValue

public java.util.Collection<T> getOriginalValue()
Gets the value that was modified (only relevant on MODIFY)

Returns:
value


Copyright © 2010. All Rights Reserved.