org.springframework.richclient.selection.binding.support
Class ValueModel2EventListBridge

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.selection.binding.support.ValueModel2EventListBridge

public class ValueModel2EventListBridge
extends Object

Creates a bridge between a ValueModel and an EventList. This means that when the ValueModel value changes, it's copied into the EventList. There's also a synchronize() method that manually copies the values.

Author:
Peter De Bruycker

Constructor Summary
ValueModel2EventListBridge(ValueModel valueModel, ca.odell.glazedlists.EventList eventList)
          Same as calling ValueModel2EventListBridge(ValueModel, EventList, boolean) with manualSynchronize = false.
ValueModel2EventListBridge(ValueModel valueModel, ca.odell.glazedlists.EventList eventList, boolean manualSynchronize)
          Creates a ValueModel2EventListBridge for the given ValueModel and EventList.
 
Method Summary
 void dispose()
          Performs necessary cleanup (removing listeners, ...)
 ca.odell.glazedlists.EventList getEventList()
          Returns the EventList.
 ValueModel getValueModel()
          Returns the ValueModel.
 void synchronize()
          Synchronizes the EventList with the ValueModel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueModel2EventListBridge

public ValueModel2EventListBridge(ValueModel valueModel,
                                  ca.odell.glazedlists.EventList eventList)
Same as calling ValueModel2EventListBridge(ValueModel, EventList, boolean) with manualSynchronize = false.

Parameters:
valueModel - the ValueModel, cannot be null
eventList - the EventList, cannot be null
See Also:
ValueModel2EventListBridge(ValueModel, EventList, boolean)

ValueModel2EventListBridge

public ValueModel2EventListBridge(ValueModel valueModel,
                                  ca.odell.glazedlists.EventList eventList,
                                  boolean manualSynchronize)
Creates a ValueModel2EventListBridge for the given ValueModel and EventList.

Parameters:
valueModel - the ValueModel, cannot be null
eventList - the EventList, cannot be null
manualSynchronize - manual or automatic synchronize?
Method Detail

synchronize

public void synchronize()
Synchronizes the EventList with the ValueModel. The values of the collection in the ValueModel are copied to the EventList. If the value in the ValueModel is null, the EventList will be emptied.


dispose

public void dispose()
Performs necessary cleanup (removing listeners, ...)


getValueModel

public ValueModel getValueModel()
Returns the ValueModel.

Returns:
the ValueModel

getEventList

public ca.odell.glazedlists.EventList getEventList()
Returns the EventList.

Returns:
the EventLists


Copyright © 2004-2009 The Spring Framework. All Rights Reserved.