Class Binding

    • Constructor Detail

      • Binding

        public Binding​(IObservable target,
                       IObservable model)
        Creates a new binding.
        Parameters:
        target - target observable
        model - model observable
    • Method Detail

      • init

        public final void init​(DataBindingContext context)
        Initializes this binding with the given context and adds it to the list of bindings of the context.

        Subclasses may extend, but must call the super implementation.

        Parameters:
        context -
      • preInit

        protected abstract void preInit()
        Called by init(DataBindingContext) after setting context but before adding this binding to the context. Subclasses may use this method to perform initialization that could not be done in the constructor. Care should be taken not to cause any events while running this method.
      • postInit

        protected abstract void postInit()
        Called by init(DataBindingContext) after adding this binding to the context. Subclasses may use this method to perform initialization that may cause events to be fired, including BindingEvents that are forwarded to the data binding context.
      • updateTargetToModel

        public abstract void updateTargetToModel()
        Updates the model's state from the target's state at the next reasonable opportunity. There is no guarantee that the state will have been updated by the time this call returns.
      • updateModelToTarget

        public abstract void updateModelToTarget()
        Updates the target's state from the model's state at the next reasonable opportunity. There is no guarantee that the state will have been updated by the time this call returns.
      • validateTargetToModel

        public abstract void validateTargetToModel()
        Validates the target's state at the next reasonable opportunity. There is no guarantee that the validation status will have been updated by the time this call returns.
      • validateModelToTarget

        public abstract void validateModelToTarget()
        Validates the model's state at the next reasonable opportunity. There is no guarantee that the validation status will have been updated by the time this call returns.
      • dispose

        public void dispose()
        Disposes of this Binding. Subclasses may extend, but must call super.dispose().
        Overrides:
        dispose in class ValidationStatusProvider
      • getTarget

        public IObservable getTarget()
        Returns the target observable
        Returns:
        the target observable
      • getModel

        public IObservable getModel()
        Returns the model observable
        Returns:
        the model observable