Class BindKt

  • All Implemented Interfaces:

    
    public final class BindKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • bind

         final static <T extends Any> Unit bind(Component $self, Property<T> property, Function1<T, Unit> setter)

        One-way bind a java.awt.Component to a Property. This component's property is immediately set to the property's value. Then changes to the property are propagated to this component.

        Parameters:
        property - Property to bind from
        setter - lambda to set this component's value.
      • bind

         final static <T extends Any> Unit bind(Component $self, MutableProperty<T> property, Function1<T, Unit> setter, Function1<Function1<T, Unit>, Unit> listenerRegister)

        Two-way bind a Component to a Property. This component's property is immediately set to the property's value (via setter). Then changes to either are propagated to the other.

        Parameters:
        property - Property to bind to
        setter - lambda to set this component value
        listenerRegister - lambda to register a NewValueListener with this component