Class DefaultFxBindingFactory

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 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 interface FxBindingFactory
      Parameters:
      componentClass - the component class
      bindingClass - 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 interface FxBindingFactory
      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 interface FxBindingFactory
      Parameters:
      binder - the binder managing the binding
      parents - the members building the declaration chain to this member, null if this binding's member is in controller
      member - the member field to bind
      component - the GUI-component to bind
      componentOptions - options to configure the component.
      Returns:
      the created binding
    • createComponentBinder

      public FxComponentBinder createComponentBinder(FxController controller)
      Description copied from interface: FxBindingFactory
      Creates a component binder.

      Notice: this method must be implemented by the concrete factory.

      Specified by:
      createComponentBinder in interface FxBindingFactory
      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 interface FxBindingFactory
      Type Parameters:
      S - type of the objects contained within the table's items list
      T - the cell value's type
      Parameters:
      binder - the binder managing the binding
      parents - the members building the declaration chain to this member, null if this binding's member is in controller
      member - the member field to bind
      columnConfig - the table column configuration
      columnOptions - options to configure the column
      Returns:
      the created binding
    • createTableBinder

      public <S> FxTableBinder<S> createTableBinder(TableConfiguration<S> tableConfiguration)
      Description copied from interface: FxBindingFactory
      Creates a table binder.

      Notice: this method must be implemented by the concrete factory.

      Specified by:
      createTableBinder in interface FxBindingFactory
      Type Parameters:
      S - type of the objects contained within the table's items list
      Parameters:
      tableConfiguration - the table configuration
      Returns:
      the binder