java.lang.Object
org.tentackle.bind.AbstractBindingFactory
org.tentackle.fx.bind.DefaultFxBindingFactory
- All Implemented Interfaces:
BindingFactory
,FxBindingFactory
@Service(FxBindingFactory.class)
public class DefaultFxBindingFactory
extends AbstractBindingFactory
implements FxBindingFactory
Default implementation of a binding factory for Fx.
- Author:
- harald
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateComponentBinder
(FxController controller) Creates a component binder.createComponentBinding
(FxComponentBinder binder, BindingMember[] parents, BindingMember member, FxComponent component, String componentOptions) Creates a component binding.<S> FxTableBinder
<S> createTableBinder
(TableConfiguration<S> tableConfiguration) Creates a table binder.<S,
T> FxTableBinding <S, T> createTableBinding
(FxTableBinder<S> binder, BindingMember[] parents, BindingMember member, TableColumnConfiguration<S, T> columnConfig, String columnOptions) Creates a table binding.Class
<? extends FxComponentBinding> getComponentBindingClass
(Class<? extends FxComponent> componentClass) Gets the binding class for a given component class.Class
<? extends FxComponentBinding> setComponentBindingClass
(Class<? extends FxComponent> componentClass, Class<? extends FxComponentBinding> bindingClass) Defines the binding for a component class.Methods inherited from class org.tentackle.bind.AbstractBindingFactory
createBindableElement, createBindingMember, getBindableCache, getBindableElementClass, putBindableElementClass
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.tentackle.bind.BindingFactory
createBindableElement, createBindingMember, getBindableCache, getBindableElementClass, putBindableElementClass
-
Constructor Details
-
DefaultFxBindingFactory
public DefaultFxBindingFactory()Creates a form binding factory.
-
-
Method Details
-
setComponentBindingClass
public Class<? extends FxComponentBinding> setComponentBindingClass(Class<? extends FxComponent> componentClass, Class<? extends FxComponentBinding> bindingClass) Description copied from interface:FxBindingFactory
Defines the binding for a component class.- Specified by:
setComponentBindingClass
in interfaceFxBindingFactory
- Parameters:
componentClass
- the component classbindingClass
- the binding class- Returns:
- the old binding class if replaced, else null
-
getComponentBindingClass
public Class<? extends FxComponentBinding> getComponentBindingClass(Class<? extends FxComponent> componentClass) Description copied from interface:FxBindingFactory
Gets the binding class for a given component class.- Specified by:
getComponentBindingClass
in interfaceFxBindingFactory
- Parameters:
componentClass
- the component class- Returns:
- the binding class, null if no specific one, i.e. use a default binding
-
createComponentBinding
public FxComponentBinding createComponentBinding(FxComponentBinder binder, BindingMember[] parents, BindingMember member, FxComponent component, String componentOptions) Description copied from interface:FxBindingFactory
Creates a component binding.Notice: this method must be implemented by the concrete factory.
- Specified by:
createComponentBinding
in interfaceFxBindingFactory
- Parameters:
binder
- the binder managing the bindingparents
- the members building the declaration chain to this member, null if this binding's member is in controllermember
- the member field to bindcomponent
- the GUI-component to bindcomponentOptions
- options to configure the component.- Returns:
- the created binding
-
createComponentBinder
Description copied from interface:FxBindingFactory
Creates a component binder.Notice: this method must be implemented by the concrete factory.
- Specified by:
createComponentBinder
in interfaceFxBindingFactory
- Parameters:
controller
- the controller for the created binder- Returns:
- the binder
-
createTableBinding
public <S,T> FxTableBinding<S,T> createTableBinding(FxTableBinder<S> binder, BindingMember[] parents, BindingMember member, TableColumnConfiguration<S, T> columnConfig, String columnOptions) Description copied from interface:FxBindingFactory
Creates a table binding.Notice: this method must be implemented by the concrete factory.
- Specified by:
createTableBinding
in interfaceFxBindingFactory
- Type Parameters:
S
- type of the objects contained within the table's items listT
- the cell value's type- Parameters:
binder
- the binder managing the bindingparents
- the members building the declaration chain to this member, null if this binding's member is in controllermember
- the member field to bindcolumnConfig
- the table column configurationcolumnOptions
- options to configure the column- Returns:
- the created binding
-
createTableBinder
Description copied from interface:FxBindingFactory
Creates a table binder.Notice: this method must be implemented by the concrete factory.
- Specified by:
createTableBinder
in interfaceFxBindingFactory
- Type Parameters:
S
- type of the objects contained within the table's items list- Parameters:
tableConfiguration
- the table configuration- Returns:
- the binder
-