Interface MenuSubject


public interface MenuSubject
A widget of the MENU shape as MenuContract drives it: a menu bar, whose rows are its titles, or a popup menu, whose rows are the root column's. The contract reads the highlight, the open state and the verbs off the tree; the subject says what each row is and reports what was chosen.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    What a row is, which decides the verbs the contract expects on it.
  • Method Summary

    Modifier and Type
    Method
    Description
    Builds the widget in a fresh root and returns the root.
    The names of the command rows chosen so far, in order.
    kindOf(int row)
    What row row is.
    void
    Shows the rows: a popup opens at its anchor, a bar has nothing to do.
    The rows the contract addresses, in order, by the name each publishes.
    The values the check rows were flipped to so far, in order.
    The widget that holds the keyboard while the rows are shown.
  • Method Details

    • build

      Widget<?> build()
      Builds the widget in a fresh root and returns the root.
    • open

      void open()
      Shows the rows: a popup opens at its anchor, a bar has nothing to do. Called once per case after the root is bound and before the tree is read.
    • widget

      Widget<?> widget()
      The widget that holds the keyboard while the rows are shown.
    • rowNames

      List<String> rowNames()
      The rows the contract addresses, in order, by the name each publishes.
    • kindOf

      MenuSubject.Row kindOf(int row)
      What row row is.
    • chosen

      List<String> chosen()
      The names of the command rows chosen so far, in order.
    • toggled

      List<Boolean> toggled()
      The values the check rows were flipped to so far, in order.