org.springframework.richclient.list
Class ListSelectionValueModelAdapter

Show UML class diagram
java.lang.Object
  extended by org.springframework.binding.value.support.AbstractPropertyChangePublisher
      extended by org.springframework.binding.value.support.AbstractValueModel
          extended by org.springframework.richclient.list.ListSelectionValueModelAdapter
All Implemented Interfaces:
EventListener, ListSelectionListener, PropertyChangePublisher, ValueModel

public class ListSelectionValueModelAdapter
extends AbstractValueModel
implements ListSelectionListener

Class to adapt the selection model of a list into a value model. This allows it to be used in conjunction with various Guard implementations.

Author:
Larry Streepy
See Also:
ListSingleSelectionGuard, ListMultipleSelectionGuard

Field Summary
 
Fields inherited from class org.springframework.binding.value.support.AbstractValueModel
logger
 
Fields inherited from interface org.springframework.binding.value.ValueModel
VALUE_PROPERTY
 
Constructor Summary
ListSelectionValueModelAdapter(ListSelectionModel model)
          Constructor.
 
Method Summary
 Object getValue()
          Returns this model's value.
 void setValue(Object newValue)
          Set the selection value.
 void valueChanged(ListSelectionEvent e)
           
 
Methods inherited from class org.springframework.binding.value.support.AbstractValueModel
addValueChangeListener, fireValueChange, fireValueChange, fireValueChange, fireValueChange, fireValueChange, fireValueChangeEvent, fireValueChangeWhenStillEqual, getValueChangeDetector, hasValueChanged, removeValueChangeListener, setValueChangeDetector, setValueSilently
 
Methods inherited from class org.springframework.binding.value.support.AbstractPropertyChangePublisher
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, firePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasChanged, hasChanged, hasChanged, hasChanged, hasChanged, hasChanged, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListSelectionValueModelAdapter

public ListSelectionValueModelAdapter(ListSelectionModel model)
Constructor.

Parameters:
model - selection model to adapt
Method Detail

valueChanged

public void valueChanged(ListSelectionEvent e)
Specified by:
valueChanged in interface ListSelectionListener

getValue

public Object getValue()
Description copied from interface: ValueModel
Returns this model's value. In case of a write-only value, implementers may choose to either reject this operation or or return null or any other appropriate value.

Specified by:
getValue in interface ValueModel
Returns:
this model's value

setValue

public void setValue(Object newValue)
Set the selection value.

Specified by:
setValue in interface ValueModel
Parameters:
newValue - must be an integer array (int[])


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