Interface ToggleSubject


public interface ToggleSubject
A widget of the TOGGLE shape as the toggle contract sees it: something that publishes one node that is on or off, which the contract can build fresh, read the state of through the widget's own API, and ask whether the flip is on offer.
  • Method Summary

    Modifier and Type
    Method
    Description
    Builds a fresh widget, off, and returns the root to bind.
    int
     
    boolean
     
    boolean
     
     
  • Method Details

    • build

      Widget<?> build()
      Builds a fresh widget, off, and returns the root to bind.
    • widget

      Widget<?> widget()
      Returns:
      the widget build() made last, whose node or descendant carries the toggle
    • isOn

      boolean isOn()
      Returns:
      whether the API says it is on now
    • operable

      boolean operable()
      Returns:
      whether the flip is on offer at all (a chart's legend can be inert)
    • changes

      int changes()
      Returns:
      how many times the widget's own change listener fired since build()