Module org.autogui

Class LambdaProperty<T>

Type Parameters:
T - the value type
All Implemented Interfaces:
GuiTypeElement

public class LambdaProperty<T> extends GuiTypeMemberProperty
Lambda-based property panes. The LambdaProperty class itself is a property for a pair of Supplier and Consumer, and member types of the class are concrete property panes. Example:
      public class StrObj {
          private String str;
          public void setStr(String s) { str = s; }
          public String getStr() { return str; }
      }

      StrObj s = new StrObj();
      LambdaStringPane strPane = new LambdaStringPane(s::getStr, s::setStr);
                     //a pane creating holding a LambdaProperty with Supplier and Consumer

      strPane.setText("update1"); //this will cause s.setStr("update")

      s.setStr("update2");
      strPane.updateSwingViewSource(); //update the pane with s.getStr()