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

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.form.binding.support.DecoratedControlBinding
All Implemented Interfaces:
ControlFactory, Binding
Direct Known Subclasses:
ScrollPaneDecoratedBinding

public class DecoratedControlBinding
extends Object
implements Binding

Wraps a source Binding and returns an alternate control in place of the source binding's control. This allows one to decorate the source binding's control (for example, by wrapping a JList in a JScrollPane). Note that this method will call the source Binding's getControl() method whenever its getControl() method is called in order to ensure that any actual initialization/binding done in the source Binding's getControl() method is performed.

Author:
Andy DePue

Constructor Summary
DecoratedControlBinding(Binding source, JComponent decoratingComponent)
           
 
Method Summary
 JComponent getControl()
          Returns the visual control that is bound to the form model's property.
 JComponent getDecoratingComponent()
           
 FormModel getFormModel()
          Returns the form model that this binding is for.
 String getProperty()
          Returns the property that this binding is for.
 Binding getSource()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecoratedControlBinding

public DecoratedControlBinding(Binding source,
                               JComponent decoratingComponent)
Method Detail

getSource

public Binding getSource()

getDecoratingComponent

public JComponent getDecoratingComponent()

getFormModel

public FormModel getFormModel()
Description copied from interface: Binding
Returns the form model that this binding is for.

Specified by:
getFormModel in interface Binding

getProperty

public String getProperty()
Description copied from interface: Binding
Returns the property that this binding is for.

Specified by:
getProperty in interface Binding

getControl

public JComponent getControl()
Description copied from interface: Binding
Returns the visual control that is bound to the form model's property.

Specified by:
getControl in interface ControlFactory
Specified by:
getControl in interface Binding
Returns:
The control, never null.


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