|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.form.binding.support.AbstractBindingFactory
org.springframework.richclient.form.binding.swing.SwingBindingFactory
org.springframework.richclient.form.binding.swing.SandboxSwingBindingFactory
public class SandboxSwingBindingFactory
A convenient extension of SwingBindingFactory
. Provides a set
of methods that address the typical binding requirements of Swing components
in the sandbox.
In order to use this factory, specify the
SandboxSwingBindingFactoryProvider
as the binding factory provider in
the application context. Like this:
<bean id="bindingFactoryProvider" class="org.springframework.richclient.form.binding.swing.SandboxSwingBindingFactoryProvider" />
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.springframework.richclient.form.binding.swing.SwingBindingFactory |
---|
SwingBindingFactory.BeanPropertyEditorClosure |
Constructor Summary | |
---|---|
SandboxSwingBindingFactory(ConfigurableFormModel formModel)
Constructor. |
Method Summary | |
---|---|
Binding |
createBoundShuttleList(String selectionFormProperty,
Object selectableItems)
Binds the values specified in the collection contained within selectableItems (which will be wrapped in a
ValueHolder to a ShuttleList , with any user selection
being placed in the form property referred to by
selectionFormProperty . |
Binding |
createBoundShuttleList(String selectionFormProperty,
Object selectableItems,
String renderedProperty)
Binds the values specified in the collection contained within selectableItems (which will be wrapped in a
ValueHolder to a ShuttleList , with any user selection
being placed in the form property referred to by
selectionFormProperty . |
Binding |
createBoundShuttleList(String selectionFormProperty,
ValueModel selectableItemsHolder,
String renderedProperty)
Binds the values specified in the collection contained within selectableItemsHolder to a ShuttleList , with any
user selection being placed in the form property referred to by
selectionFormProperty . |
Methods inherited from class org.springframework.richclient.form.binding.swing.SwingBindingFactory |
---|
createBoundCheckBox, createBoundComboBox, createBoundComboBox, createBoundComboBox, createBoundComboBox, createBoundComboBox, createBoundComboBox, createBoundFormattedTextField, createBoundFormattedTextField, createBoundLabel, createBoundList, createBoundList, createBoundList, createBoundList, createBoundList, createBoundList, createBoundListModel, createBoundSpinner, createBoundTextArea, createBoundTextArea, createBoundTextField, createBoundToggleButton |
Methods inherited from class org.springframework.richclient.form.binding.support.AbstractBindingFactory |
---|
bindControl, bindControl, createBinding, createBinding, createBinding, createBinding, createContext, getBinderSelectionStrategy, getFormModel, interceptBinding, setBinderSelectionStrategy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SandboxSwingBindingFactory(ConfigurableFormModel formModel)
formModel
- Method Detail |
---|
public Binding createBoundShuttleList(String selectionFormProperty, ValueModel selectableItemsHolder, String renderedProperty)
selectableItemsHolder
to a ShuttleList
, with any
user selection being placed in the form property referred to by
selectionFormProperty
. Each item in the list will be
rendered by looking up a property on the item by the name contained in
renderedProperty
, retrieving the value of the property,
and rendering that value in the UI.
Note that the selection in the bound list will track any changes to the
selectionFormProperty
. This is especially useful to
preselect items in the list - if selectionFormProperty
is
not empty when the list is bound, then its content will be used for the
initial selection.
selectionFormProperty
- form property to hold user's selection. This
property must be a Collection
or array type.selectableItemsHolder
- ValueModel
containing the
items with which to populate the list.renderedProperty
- the property to be queried for each item in the
list, the result of which will be used to render that item in the
UI. May be null, in which case the selectable items will be
rendered as strings.
Binding
. Note that the bound control is of
type ShuttleList
. Access this component to set specific
display properties.public Binding createBoundShuttleList(String selectionFormProperty, Object selectableItems, String renderedProperty)
selectableItems
(which will be wrapped in a
ValueHolder
to a ShuttleList
, with any user selection
being placed in the form property referred to by
selectionFormProperty
. Each item in the list will be
rendered by looking up a property on the item by the name contained in
renderedProperty
, retrieving the value of the property,
and rendering that value in the UI.
Note that the selection in the bound list will track any changes to the
selectionFormProperty
. This is especially useful to
preselect items in the list - if selectionFormProperty
is
not empty when the list is bound, then its content will be used for the
initial selection.
selectionFormProperty
- form property to hold user's selection. This
property must be a Collection
or array type.selectableItems
- Collection or array containing the items with
which to populate the selectable list (this object will be wrapped
in a ValueHolder).renderedProperty
- the property to be queried for each item in the
list, the result of which will be used to render that item in the
UI. May be null, in which case the selectable items will be
rendered as strings.
Binding
. Note that the bound control is of
type ShuttleList
. Access this component to set specific
display properties.public Binding createBoundShuttleList(String selectionFormProperty, Object selectableItems)
selectableItems
(which will be wrapped in a
ValueHolder
to a ShuttleList
, with any user selection
being placed in the form property referred to by
selectionFormProperty
. Each item in the list will be
rendered as a String.
Note that the selection in the bound list will track any changes to the
selectionFormProperty
. This is especially useful to
preselect items in the list - if selectionFormProperty
is
not empty when the list is bound, then its content will be used for the
initial selection.
selectionFormProperty
- form property to hold user's selection. This
property must be a Collection
or array type.selectableItems
- Collection or array containing the items with
which to populate the selectable list (this object will be wrapped
in a ValueHolder).
Binding
. Note that the bound control is of
type ShuttleList
. Access this component to set specific
display properties.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |