|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.binding.swingx.BindingFactory
public class BindingFactory
Choosing strategy for creating Bindings.
Extracted from DefaultFormFactory to have a "pluggable" place for creating custom bindings. The usage of a BindingCreator should be viewed as an implementation detail, they don't do much. PENDING: there's a implicit coupling to ComponentMap - the BindingMap assumes that the ComponentMap did a good enough job when choosing components.
PENDING: should be factored into an interface and a default implementation.
PENDING: really want to configure the component here?
| Nested Class Summary | |
|---|---|
static class |
BindingFactory.CheckBoxBindingCreator
|
static class |
BindingFactory.ComboBoxBindingCreator
|
static class |
BindingFactory.DatePickerBindingCreator
|
static class |
BindingFactory.HyperlinkBindingCreator
|
static class |
BindingFactory.ImagePanelBindingCreator
|
static class |
BindingFactory.LabelBindingCreator
|
class |
BindingFactory.LabelMetaBindingCreator
BindingCreator for binding a label to the metaData of the given field. |
static class |
BindingFactory.ListBindingCreator
|
static class |
BindingFactory.RadioGroupBindingCreator
|
static class |
BindingFactory.RequiredBindingCreator
|
static class |
BindingFactory.SpinnerBindingCreator
|
class |
BindingFactory.TableBindingCreator
|
static class |
BindingFactory.TextBindingCreator
|
| Constructor Summary | |
|---|---|
BindingFactory()
|
|
| Method Summary | |
|---|---|
Binding |
createBinding(javax.swing.JComponent component,
DataModel model,
java.lang.String fieldName)
Creates and returns Binding between the component and a field of the DataModel. |
Binding |
createMetaBinding(javax.swing.JLabel label,
DataModel model,
java.lang.String fieldName)
Creates and returns Binding between the component and the metaData of a field of the DataModel. |
protected BindingCreator |
findByAssignable(java.lang.Class componentClass)
|
protected BindingCreator |
getBindingCreator(javax.swing.JComponent component)
encapsulates lookup strategy to find an appropriate BindingCreator for the given component. |
protected java.util.Map |
getBindingMap()
|
static BindingFactory |
getInstance()
|
protected BindingCreator |
getMetaBindingCreator()
returns the unique BindingCreator for binding (a label) to the metaData - typically to the label property. |
protected void |
initBindingMap(java.util.Map map)
|
static void |
setInstance(BindingFactory bindingMap)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BindingFactory()
| Method Detail |
|---|
public static BindingFactory getInstance()
public static void setInstance(BindingFactory bindingMap)
public Binding createBinding(javax.swing.JComponent component,
DataModel model,
java.lang.String fieldName)
component - model - fieldName -
java.lang.NullPointerException - if any of the parameters is null.
public Binding createMetaBinding(javax.swing.JLabel label,
DataModel model,
java.lang.String fieldName)
component - model - fieldName -
java.lang.NullPointerException - if any of the parameters is null.protected BindingCreator getMetaBindingCreator()
protected BindingCreator getBindingCreator(javax.swing.JComponent component)
Here:
component -
protected BindingCreator findByAssignable(java.lang.Class componentClass)
protected java.util.Map getBindingMap()
protected void initBindingMap(java.util.Map map)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||