org.beanfabrics.event
Class ListSupport

java.lang.Object
  extended by org.beanfabrics.event.ListSupport

public class ListSupport
extends java.lang.Object

The ListSupport is a utility class for handling ListListener objects.


Constructor Summary
ListSupport(IListPM<?> source)
          Constructs a ListSupport for the given source.
 
Method Summary
 void addListListener(ListListener listener)
          Adds the given listener.
 void fireElementChanged(ElementChangedEvent evt)
          Fires the given ElementChangedEvent to each registered listener.
 void fireElementChanged(int index)
          Fires a ElementChangedEvent with the given index to each registered listener.
 void fireElementChanged(int index, java.util.EventObject cause)
          Fires a ElementChangedEvent with the given attributes to each registered listener.
 void fireElementsAdded(ElementsAddedEvent evt)
          Fires the given ElementsAddedEvent to each registered listener.
 void fireElementsAdded(int beginIndex, int length)
          Fires a ElementsAddedEvent with the given attributes to each registered listener.
 void fireElementsDeselected(java.util.Collection<java.lang.Integer> indices)
          Fires a ElementsDeselectedEvent with the given indices to each registered listener.
 void fireElementsDeselected(ElementsDeselectedEvent evt)
          Fires the given ElementsDeselectedEvent to each registered listener.
 void fireElementsDeselected(int[] indices)
          Fires a ElementsDeselectedEvent with the given indices to each registered listener.
 void fireElementsDeselected(int beginIndex, int length)
          Fires a ElementsDeselectedEvent with the given attributes to each registered listener.
 void fireElementsRemoved(ElementsRemovedEvent evt)
          Fires the given ElementsRemovedEvent to each registered listener.
 void fireElementsRemoved(int beginIndex, int length, java.util.Collection<PresentationModel> removed)
          Fires a ElementsRemovedEvent with the given attributes to each registered listener.
 void fireElementsRemoved(int index, PresentationModel removed)
          Fires a ElementsRemovedEvent with the given attributes to each registered listener.
 void fireElementsReplaced(ElementsReplacedEvent evt)
          Fires the given ElementsReplacedEvent to each registered listener.
 void fireElementsReplaced(int beginIndex, int length, java.util.Collection<PresentationModel> old)
          Fires a ElementsReplacedEvent with the given attributes to each registered listener.
 void fireElementsReplaced(int index, PresentationModel old)
          Fires a ElementsReplacedEvent with the given attributes to each registered listener.
 void fireElementsSelected(java.util.Collection<java.lang.Integer> indices)
          Fires a ElementsSelectedEvent with the given indices to each registered listener.
 void fireElementsSelected(ElementsSelectedEvent evt)
          Fires the given ElementsSelectedEvent to each registered listener.
 void fireElementsSelected(int[] indices)
          Fires a ElementsSelectedEvent with the given indices to each registered listener.
 void fireElementsSelected(int beginIndex, int length)
          Fires a ElementsSelectedEvent with the given attributes to each registered listener.
 void removeListListener(ListListener listener)
          Removes the given listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListSupport

public ListSupport(IListPM<?> source)
Constructs a ListSupport for the given source.

Parameters:
source -
Method Detail

addListListener

public void addListListener(ListListener listener)
Adds the given listener.

Parameters:
listener -

removeListListener

public void removeListListener(ListListener listener)
Removes the given listener.

Parameters:
listener -

fireElementsAdded

public void fireElementsAdded(ElementsAddedEvent evt)
Fires the given ElementsAddedEvent to each registered listener.

Parameters:
evt -

fireElementsAdded

public void fireElementsAdded(int beginIndex,
                              int length)
Fires a ElementsAddedEvent with the given attributes to each registered listener.

Parameters:
beginIndex -
length -

fireElementsRemoved

public void fireElementsRemoved(ElementsRemovedEvent evt)
Fires the given ElementsRemovedEvent to each registered listener.

Parameters:
evt -

fireElementsRemoved

public void fireElementsRemoved(int beginIndex,
                                int length,
                                java.util.Collection<PresentationModel> removed)
Fires a ElementsRemovedEvent with the given attributes to each registered listener.

Parameters:
beginIndex -
length -
removed -

fireElementsRemoved

public void fireElementsRemoved(int index,
                                PresentationModel removed)
Fires a ElementsRemovedEvent with the given attributes to each registered listener.

Parameters:
index -
removed -

fireElementsReplaced

public void fireElementsReplaced(ElementsReplacedEvent evt)
Fires the given ElementsReplacedEvent to each registered listener.

Parameters:
evt -

fireElementsReplaced

public void fireElementsReplaced(int beginIndex,
                                 int length,
                                 java.util.Collection<PresentationModel> old)
Fires a ElementsReplacedEvent with the given attributes to each registered listener.

Parameters:
beginIndex -
length -
old -

fireElementsReplaced

public void fireElementsReplaced(int index,
                                 PresentationModel old)
Fires a ElementsReplacedEvent with the given attributes to each registered listener.

Parameters:
index -
old -

fireElementChanged

public void fireElementChanged(ElementChangedEvent evt)
Fires the given ElementChangedEvent to each registered listener.

Parameters:
evt -

fireElementChanged

public void fireElementChanged(int index)
Fires a ElementChangedEvent with the given index to each registered listener.

Parameters:
index -

fireElementChanged

public void fireElementChanged(int index,
                               java.util.EventObject cause)
Fires a ElementChangedEvent with the given attributes to each registered listener.

Parameters:
index -
cause -

fireElementsSelected

public void fireElementsSelected(ElementsSelectedEvent evt)
Fires the given ElementsSelectedEvent to each registered listener.

Parameters:
evt -

fireElementsSelected

public void fireElementsSelected(int beginIndex,
                                 int length)
Fires a ElementsSelectedEvent with the given attributes to each registered listener.

Parameters:
beginIndex -
length -

fireElementsSelected

public void fireElementsSelected(int[] indices)
Fires a ElementsSelectedEvent with the given indices to each registered listener.

Parameters:
indices -

fireElementsSelected

public void fireElementsSelected(java.util.Collection<java.lang.Integer> indices)
Fires a ElementsSelectedEvent with the given indices to each registered listener.

Parameters:
indices -

fireElementsDeselected

public void fireElementsDeselected(ElementsDeselectedEvent evt)
Fires the given ElementsDeselectedEvent to each registered listener.

Parameters:
evt -

fireElementsDeselected

public void fireElementsDeselected(int beginIndex,
                                   int length)
Fires a ElementsDeselectedEvent with the given attributes to each registered listener.

Parameters:
beginIndex -
length -

fireElementsDeselected

public void fireElementsDeselected(int[] indices)
Fires a ElementsDeselectedEvent with the given indices to each registered listener.

Parameters:
indices -

fireElementsDeselected

public void fireElementsDeselected(java.util.Collection<java.lang.Integer> indices)
Fires a ElementsDeselectedEvent with the given indices to each registered listener.

Parameters:
indices -