Interface SyMenuType

All Superinterfaces:
SyActiveReadableType, SyActiveType, SyBoundedReadableType<SySpaceParentRelativeType>, SyBoundedType<SySpaceParentRelativeType>, SyComponentReadableType, SyComponentType, SyEventReceiverType, SyKeyboardFocusableReadableType, SyKeyboardFocusableType, SyMenuReadableType, SyMouseFocusAcceptingReadableType, SyMouseFocusAcceptingType, SySizedReadableType<SySpaceParentRelativeType>, SySizedType<SySpaceParentRelativeType>, SyThemeableReadableType, SyThemeableType, SyVisibleReadableType, SyVisibleType

public interface SyMenuType extends SyComponentType, SyMenuReadableType
A menu. A menu typically presents a vertical list of menu items, each of which can be selected by clicking. A menu is either expanded or not expanded. Only one menu can be expanded within a screen at any given time. Clicking outside of the menu typically causes the expanded menu to be no longer expanded. Menus form a tree structure, with exactly one root.
  • Method Details

    • addSeparator

      SyMenuItemSeparatorType addSeparator()
      Add a new separator menu item.
      Returns:
      The item
    • addAtom

      SyMenuItemAtomType addAtom(SyText text, Runnable action)
      Add a new atom menu item
      Parameters:
      text - The item text
      action - The item action
      Returns:
      The item
    • addSubmenu

      SyMenuItemSubmenuType addSubmenu(SyText text, SyMenuType menu)
      Add a new submenu menu item
      Parameters:
      text - The item text
      menu - The menu
      Returns:
      The item
    • expanded

      com.io7m.jattribute.core.AttributeType<Boolean> expanded()
      Specified by:
      expanded in interface SyMenuReadableType
      Returns:
      An attribute that indicates if this menu is currently expanded
    • items

      Returns:
      An immutable snapshot of the items within the menu