org.springframework.richclient.form.binding.swing
Class EnumRadioButtonBinder

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.application.support.ApplicationServicesAccessor
      extended by org.springframework.richclient.form.binding.support.AbstractBinder
          extended by org.springframework.richclient.form.binding.swing.EnumRadioButtonBinder
All Implemented Interfaces:
Binder

public class EnumRadioButtonBinder
extends AbstractBinder

Radio button binder for enum values. Use this in your Application Context to configure the binder:

 <bean name="enumRadioButtonBinder" class="org.springframework.richclient.form.binding.swing.EnumRadioButtonBinder" />
 
Or when you need an additional null value that can be selected:
 <bean name="enumRadioButtonBinder" class="org.springframework.richclient.form.binding.swing.EnumRadioButtonBinder" >
     <property name="nullable" value="true" />
 </bean>
 

Author:
Lieven Doclo

Field Summary
 
Fields inherited from class org.springframework.richclient.form.binding.support.AbstractBinder
BINDING_CLIENT_PROPERTY_KEY, log
 
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
logger
 
Constructor Summary
EnumRadioButtonBinder()
          Creates a new binder
 
Method Summary
protected  JComponent createControl(Map context)
           
protected  Binding doBind(JComponent control, FormModel formModel, String formPropertyPath, Map context)
           
 void setNullable(boolean nullable)
          Sets whether this control can contain a null value
 
Methods inherited from class org.springframework.richclient.form.binding.support.AbstractBinder
bind, bind, getPropertyType, getRequiredSourceClass, validateContextKeys
 
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
 

Constructor Detail

EnumRadioButtonBinder

public EnumRadioButtonBinder()
Creates a new binder

Method Detail

createControl

protected JComponent createControl(Map context)
Specified by:
createControl in class AbstractBinder

setNullable

public void setNullable(boolean nullable)
Sets whether this control can contain a null value

Parameters:
nullable - true if the binder needs to contain a null value

doBind

protected Binding doBind(JComponent control,
                         FormModel formModel,
                         String formPropertyPath,
                         Map context)
Specified by:
doBind in class AbstractBinder


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