org.springframework.richclient.form.binding.swing
Class ListBinding
java.lang.Object
org.springframework.richclient.application.support.ApplicationServicesAccessor
org.springframework.richclient.factory.AbstractControlFactory
org.springframework.richclient.form.binding.support.AbstractBinding
org.springframework.richclient.form.binding.swing.AbstractListBinding
org.springframework.richclient.form.binding.swing.ListBinding
- All Implemented Interfaces:
- ControlFactory, Binding
public class ListBinding
- extends AbstractListBinding
Methods inherited from class org.springframework.richclient.form.binding.swing.AbstractListBinding |
convertValue, createFilteredModel, createModel, createSortedListModel, doBindControl, enabledChanged, getBindingModel, getComparator, getComponent, getFilter, getFilteredModel, getSelectableItems, readOnlyChanged, selectableItemsChanged, setComparator, setFilter, setSelectableItems |
Methods inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
getActiveWindow, getApplication, getApplicationContext, getApplicationName, getApplicationServices, getCommandConfigurer, getComponentFactory, getConversionService, getIconSource, getImageSource, getMessage, getMessage, getMessage, getMessage, getMessages, getMessageSource, getObjectConfigurer, getService |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.richclient.form.binding.Binding |
getControl |
ListBinding
public ListBinding(JList list,
FormModel formModel,
String formFieldPath,
Class requiredSourceClass)
getList
public JList getList()
setSelectionMode
public void setSelectionMode(int selectionMode)
getSelectionMode
public int getSelectionMode()
getPropertyConversionExecutor
protected org.springframework.binding.convert.ConversionExecutor getPropertyConversionExecutor()
- Returns a conversion executor which converts a value of the given sourceType into the fieldType
- Parameters:
sourceType
- the sourceType
- Returns:
- true if a converter is available, otherwise false
- See Also:
AbstractBinding.getPropertyType()
isPropertyConversionExecutorAvailable
protected boolean isPropertyConversionExecutorAvailable()
updateSelectedItemsFromSelectionModel
protected void updateSelectedItemsFromSelectionModel()
convertSelectedValues
protected Object convertSelectedValues(Object[] selectedValues)
- Converts the given values into a type that matches the fieldType
- Parameters:
selectedValues
- the selected values
- Returns:
- the value which can be assigned to the type of the field
doBindControl
protected void doBindControl(ListModel bindingModel)
- Specified by:
doBindControl
in class AbstractListBinding
updateSelectedItemsFromValueModel
protected void updateSelectedItemsFromValueModel()
- Updates the selection model with the selected values from the value model.
determineValueIndexes
protected int[] determineValueIndexes(Object[] values)
- Parameters:
values
-
- Returns:
setRenderer
public void setRenderer(ListCellRenderer renderer)
getRenderer
public ListCellRenderer getRenderer()
getDefaultModel
protected ListModel getDefaultModel()
- Specified by:
getDefaultModel
in class AbstractListBinding
Copyright © 2004-2008 The Spring Framework. All Rights Reserved.