|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject org.apache.commons.events.observable.ModificationEvent
public class ModificationEvent
Base event class extended by each class that encapsulates event information.
This class can be used as is, but generally it is subclassed.
Field Summary | |
---|---|
protected ObservableCollection |
collection
The source collection |
protected ModificationHandler |
handler
The handler |
protected int |
type
The event code |
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
ModificationEvent(ObservableCollection obsCollection,
ModificationHandler handler,
int type)
Constructor. |
Method Summary | |
---|---|
Collection |
getBaseCollection()
Gets the base collection underlying the observable collection. |
ModificationHandler |
getHandler()
Gets the handler of the events. |
ObservableCollection |
getObservedCollection()
Gets the collection the event is reporting on. |
int |
getType()
Gets the event type constant. |
String |
toString()
Gets a debugging string version of the event. |
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final ObservableCollection collection
protected final ModificationHandler handler
protected final int type
Constructor Detail |
---|
public ModificationEvent(ObservableCollection obsCollection, ModificationHandler handler, int type)
obsCollection
- the event sourcehandler
- the handlertype
- the event typeMethod Detail |
---|
public ObservableCollection getObservedCollection()
Using this collection will bypass any decorators that have been added
to the ObservableCollection
. For example, if a synchronized
decorator was added it will not be called by changes to this collection.
For the synchronization case, you are normally OK however. If you process the event in the same thread as the original change then your code will be protected by the original synchronized decorator and this collection may be used freely.
public Collection getBaseCollection()
Using this collection will bypass the event sending mechanism. It will also bypass any other decorators, such as synchronization. Use with care.
public ModificationHandler getHandler()
public int getType()
This is one of the method constants from ModificationEventType
.
public String toString()
toString
in class EventObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |