java.lang.Object
org.springframework.shell.jline.tui.component.view.control.MenuView.MenuItem
Direct Known Subclasses:
MenuView.Menu
Enclosing class:
MenuView

public static class MenuView.MenuItem extends Object
MenuView.MenuItem represents an item in a MenuView.
See Also:
  • Constructor Details

    • MenuItem

      public MenuItem(String title)
      Construct menu item with a title.
      Parameters:
      title - the title
    • MenuItem

      public MenuItem(String title, MenuView.MenuItemCheckStyle checkStyle)
      Construct menu item with a title and a check style.
      Parameters:
      title - the title
      checkStyle - the check style
    • MenuItem

      public MenuItem(String title, MenuView.MenuItemCheckStyle checkStyle, @Nullable Runnable action)
      Construct menu item with a title, a check style and a runnable.
      Parameters:
      title - the title
      checkStyle - the check style
      action - the action to run when item is chosen
    • MenuItem

      public MenuItem(String title, MenuView.MenuItemCheckStyle checkStyle, @Nullable Runnable action, boolean initialCheckState)
      Construct menu item with a title, a check style, a runnable and initial checked state.
      Parameters:
      title - the title
      checkStyle - the check style
      action - the action to run when item is chosen
      initialCheckState - initial checked state
    • MenuItem

      protected MenuItem(String title, MenuView.MenuItem[] items)
    • MenuItem

      protected MenuItem(String title, List<MenuView.MenuItem> items)
  • Method Details