org.springframework.richclient.form.binding.swing
Class ComboBoxBinder
java.lang.Object
org.springframework.richclient.application.support.ApplicationServicesAccessor
org.springframework.richclient.form.binding.support.AbstractBinder
org.springframework.richclient.form.binding.swing.AbstractListBinder
org.springframework.richclient.form.binding.swing.ComboBoxBinder
- All Implemented Interfaces:
- Binder
- Direct Known Subclasses:
- EnumComboBoxBinder, TigerEnumComboBoxBinder
public class ComboBoxBinder
- extends AbstractListBinder
- Author:
- Oliver Hutchison
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 |
RENDERER_KEY
public static final String RENDERER_KEY
- See Also:
- Constant Field Values
EDITOR_KEY
public static final String EDITOR_KEY
- See Also:
- Constant Field Values
EMPTY_SELECTION_VALUE
public static final String EMPTY_SELECTION_VALUE
- context key for a value which is used to mark an empty Selection. If this value is selected null will be assigned
to the fields value
- See Also:
- Constant Field Values
ComboBoxBinder
public ComboBoxBinder()
ComboBoxBinder
public ComboBoxBinder(String[] supportedContextKeys)
ComboBoxBinder
public ComboBoxBinder(Class requiredSourceClass,
String[] supportedContextKeys)
createListBinding
protected AbstractListBinding createListBinding(JComponent control,
FormModel formModel,
String formPropertyPath)
- Description copied from class:
AbstractListBinder
- Called to create the binding instance
- Specified by:
createListBinding
in class AbstractListBinder
- Parameters:
control
- the control to bindformModel
- the formmodel with the value of the formPropertyPath
fieldformPropertyPath
- the field path to bind
- Returns:
- the binding instance. Must not be null
applyContext
protected void applyContext(AbstractListBinding binding,
Map context)
- Description copied from class:
AbstractListBinder
- Applies any context or preset value.
- Overrides:
applyContext
in class AbstractListBinder
- Parameters:
binding
- the binding to apply the valuescontext
- contains context dependent values
createControl
protected JComponent createControl(Map context)
- Specified by:
createControl
in class AbstractBinder
setRenderer
public void setRenderer(ListCellRenderer renderer)
setRendererClosure
public void setRendererClosure(Closure rendererClosure)
- Defines a closure which is called to create the renderer. The argument for the closure will be the default
renderer (see
JComboBox.getRenderer()
of the combobox. The closure must create an instance of
ListCellRenderer
- Parameters:
rendererClosure
- the closure which is used to create the renderer
setEditor
public void setEditor(ComboBoxEditor editor)
setEditorClosure
public void setEditorClosure(Closure editorClosure)
- Defines a closure which is called to create the editor. The argument for the closure will be the default editor
(see
JComboBox.getEditor()
of the combobox. The closure must create an instance of ComboBoxEditor
- Parameters:
editorClosure
- the closure which is used to create the editor
getEmptySelectionValue
public Object getEmptySelectionValue()
setEmptySelectionValue
public void setEmptySelectionValue(Object emptySelectionValue)
Copyright © 2004-2008 The Spring Framework. All Rights Reserved.