org.springframework.richclient.form.binding.support
Class CustomBinding

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.application.support.ApplicationServicesAccessor
      extended by org.springframework.richclient.factory.AbstractControlFactory
          extended by org.springframework.richclient.form.binding.support.AbstractBinding
              extended by org.springframework.richclient.form.binding.support.CustomBinding
All Implemented Interfaces:
ControlFactory, Binding
Direct Known Subclasses:
AbstractCRUDBinding, AbstractDateFieldBinding, AbstractLookupBinding, EnumRadioButtonBinding, FileChooserBinding, LabelBinding, ListSelectionDialogBinding, NumberBinding, SliderBinding, SpinnerBinding, TimeBinding, ToggleButtonBinding

public abstract class CustomBinding
extends AbstractBinding

A helper implementation for binding to custom controls.

Author:
Oliver Hutchison

Field Summary
 
Fields inherited from class org.springframework.richclient.form.binding.support.AbstractBinding
fieldMetadata, formModel, formPropertyPath
 
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
logger
 
Constructor Summary
protected CustomBinding(FormModel formModel, String formPropertyPath, Class requiredSourceClass)
           
 
Method Summary
protected  void controlValueChanged(Object newValue)
          Should be called when the bound component's value changes.
protected  boolean isReadOnly()
          We were using an override to check the setter's visibility on the backing object.
 void setReadOnly(boolean readOnly)
          Force this binding to be readonly, whatever the metaInfo.
protected abstract  void valueModelChanged(Object newValue)
          Called when the underlying property's value model value changes.
 
Methods inherited from class org.springframework.richclient.form.binding.support.AbstractBinding
createControl, doBindControl, enabledChanged, getFieldFace, getFormModel, getProperty, getPropertyType, getValue, getValueModel, isEnabled, readOnlyChanged
 
Methods inherited from class org.springframework.richclient.factory.AbstractControlFactory
createControlIfNecessary, getControl, isControlCreated, isSingleton, setSingleton
 
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
 

Constructor Detail

CustomBinding

protected CustomBinding(FormModel formModel,
                        String formPropertyPath,
                        Class requiredSourceClass)
Method Detail

valueModelChanged

protected abstract void valueModelChanged(Object newValue)
Called when the underlying property's value model value changes.


controlValueChanged

protected final void controlValueChanged(Object newValue)
Should be called when the bound component's value changes.


setReadOnly

public void setReadOnly(boolean readOnly)
Force this binding to be readonly, whatever the metaInfo.

Parameters:
readOnly - true if only read-access should be allowed.

isReadOnly

protected boolean isReadOnly()
We were using an override to check the setter's visibility on the backing object.

Overrides:
isReadOnly in class AbstractBinding
See Also:
FormPropertyState


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