org.springframework.richclient.form.binding.swing
Class TigerEnumComboBoxBinder
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
org.springframework.richclient.form.binding.swing.TigerEnumComboBoxBinder
- All Implemented Interfaces:
- Binder
public class TigerEnumComboBoxBinder
- extends ComboBoxBinder
Binds a Tiger enum in a combobox and supports i18n.
The i18n key of an enum is the full classname + "." +
enumfield.
For example:
x.y.Season.WINTER = Winter
configuration happens like this:
<bean id="binderSelectionStrategy"
class="org.springframework.richclient.form.binding.swing.SwingBinderSelectionStrategy">
<property name="bindersForPropertyTypes">
<map>
<entry>
<key>
<value type="java.lang.Class">java.lang.Enum</value>
</key>
<bean class="org.springframework.richclient.form.binding.swing.TigerEnumComboBoxBinder" />
</entry>
</map>
</property>
</bean>
- Author:
- Geoffrey De Smet
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 |
TigerEnumComboBoxBinder
protected TigerEnumComboBoxBinder()
createListBinding
protected AbstractListBinding createListBinding(JComponent control,
FormModel formModel,
String formPropertyPath)
- Description copied from class:
AbstractListBinder
- Called to create the binding instance
- Overrides:
createListBinding
in class ComboBoxBinder
- 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
createEnumSelectableItems
protected Enum[] createEnumSelectableItems(FormModel formModel,
String formPropertyPath)
Copyright © 2004-2008 The Spring Framework. All Rights Reserved.