Class DefaultFxBindingFactory

  • All Implemented Interfaces:
    org.tentackle.bind.BindingFactory, FxBindingFactory

    @Service(FxBindingFactory.class)
    public class DefaultFxBindingFactory
    extends org.tentackle.bind.AbstractBindingFactory
    implements FxBindingFactory
    Default implementation of a binding factory for Fx.
    Author:
    harald
    • Constructor Detail

      • DefaultFxBindingFactory

        public DefaultFxBindingFactory()
        Creates a form binding factory.
    • Method Detail

      • setComponentBindingClass

        public java.lang.Class<? extends FxComponentBinding> setComponentBindingClass​(java.lang.Class<? extends FxComponent> componentClass,
                                                                                      java.lang.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 java.lang.Class<? extends FxComponentBinding> getComponentBindingClass​(java.lang.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,
                                                         org.tentackle.bind.BindingMember[] parents,
                                                         org.tentackle.bind.BindingMember member,
                                                         FxComponent component,
                                                         java.lang.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
      • createTableBinding

        public <S,​T> FxTableBinding<S,​T> createTableBinding​(FxTableBinder<S> binder,
                                                                        org.tentackle.bind.BindingMember[] parents,
                                                                        org.tentackle.bind.BindingMember member,
                                                                        TableColumnConfiguration<S,​T> columnConfig,
                                                                        java.lang.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