org.apache.commons.events.observable
Class ModificationHandler.SetViewHandler

java.lang.Object
  extended by org.apache.commons.events.observable.ModificationHandler
      extended by org.apache.commons.events.observable.ModificationHandler.SetViewHandler
Enclosing class:
ModificationHandler

protected static class ModificationHandler.SetViewHandler
extends ModificationHandler

Inner class for views.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.commons.events.observable.ModificationHandler
ModificationHandler.SetViewHandler, ModificationHandler.SubListHandler
 
Constructor Summary
protected ModificationHandler.SetViewHandler(ModificationHandler rootHandler)
          Constructor.
 
Method Summary
protected  void postEvent(boolean modified, int type, int index, Object object, int repeat, Object previous, ObservableCollection ignoredView, int offset)
          Override the postEvent method to forward all events to the underlying handler.
protected  boolean preEvent(int type, int index, Object object, int repeat, Object previous, ObservableCollection ignoredView, int offset)
          Override the preEvent method to forward all events to the underlying handler.
 
Methods inherited from class org.apache.commons.events.observable.ModificationHandler
addPostModificationListener, addPreModificationListener, createHeadSetHandler, createSubListHandler, createSubSetHandler, createTailSetHandler, getBaseCollection, getObservedCollection, getPostModificationListeners, getPreModificationListeners, getRootHandler, getViewOffset, postAdd, postAddAll, postAddAllIndexed, postAddIndexed, postAddIterated, postAddNCopies, postClear, postRemove, postRemoveAll, postRemoveIndexed, postRemoveIterated, postRemoveNCopies, postRemoveNext, postRetainAll, postSetIndexed, postSetIterated, preAdd, preAddAll, preAddAllIndexed, preAddIndexed, preAddIterated, preAddNCopies, preClear, preRemove, preRemoveAll, preRemoveIndexed, preRemoveIterated, preRemoveNCopies, preRemoveNext, preRetainAll, preSetIndexed, preSetIterated, removePostModificationListener, removePreModificationListener, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModificationHandler.SetViewHandler

protected ModificationHandler.SetViewHandler(ModificationHandler rootHandler)
Constructor.

Parameters:
rootHandler - the base underlying handler
Method Detail

preEvent

protected boolean preEvent(int type,
                           int index,
                           Object object,
                           int repeat,
                           Object previous,
                           ObservableCollection ignoredView,
                           int offset)
Override the preEvent method to forward all events to the underlying handler. This method also inserts details of the view that caused the event.

Overrides:
preEvent in class ModificationHandler
Parameters:
type - the event type to send
index - the index where the change starts, the method param or derived
object - the object that will be added/removed/set, the method param or derived
repeat - the number of repeats of the add/remove, the method param or derived
previous - the previous value that will be removed/replaced, must exist in coll
ignoredView - the view collection that the change was actioned on, null if no view
offset - the offset of the subList view, -1 if unknown

postEvent

protected void postEvent(boolean modified,
                         int type,
                         int index,
                         Object object,
                         int repeat,
                         Object previous,
                         ObservableCollection ignoredView,
                         int offset)
Override the postEvent method to forward all events to the underlying handler. This method also inserts details of the view that caused the event.

Overrides:
postEvent in class ModificationHandler
Parameters:
modified - true if the method succeeded in changing the collection
type - the event type to send
index - the index where the change starts, the method param or derived
object - the object that was added/removed/set, the method param or derived
repeat - the number of repeats of the add/remove, the method param or derived
previous - the previous value that was removed/replace, must have existed in coll
ignoredView - the view collection that the change was actioned on, null if no view
offset - the offset of the subList view, -1 if unknown


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.