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
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 Summary
Modifier and TypeMethodDescriptionAdd a new atom menu itemAdd a new separator menu item.addSubmenu(SyText text, SyMenuType menu) Add a new submenu menu itemcom.io7m.jattribute.core.AttributeType<Boolean> expanded()items()com.io7m.jorchard.core.JOTreeNodeType<SyMenuType> menuNode()Methods inherited from interface SyActiveReadableType
isMouseOverMethods inherited from interface SyActiveType
activity, setActiveMethods inherited from interface SyBoundedReadableType
boundingAreaMethods inherited from interface SyBoundedType
position, setPositionMethods inherited from interface SyComponentReadableType
ancestorMatchingReadable, childCount, isActive, isVisible, nodeReadable, relativePositionOf, screen, viewportPositionOf, windowReadableMethods inherited from interface SyComponentType
ancestorMatching, childAdd, childRemove, childrenClear, componentForWindowRelative, layout, node, windowMethods inherited from interface SyEventReceiverType
eventSendMethods inherited from interface SyKeyboardFocusableType
keyboardFocusBehaviorMethods inherited from interface SyMenuReadableType
menuNodeReadable, themeClassesDefaultForComponentMethods inherited from interface SyMouseFocusAcceptingReadableType
isMouseQueryAcceptingMethods inherited from interface SyMouseFocusAcceptingType
setMouseQueryAcceptingMethods inherited from interface SySizedType
setSize, setSizeUpperLimit, size, sizeUpperLimitMethods inherited from interface SyThemeableReadableType
themeClassesExtra, themeClassesInPreferenceOrderMethods inherited from interface SyVisibleType
setVisible, visibility
-
Method Details
-
addSeparator
-
addAtom
Add a new atom menu item- Parameters:
text- The item textaction- The item action- Returns:
- The item
-
expanded
com.io7m.jattribute.core.AttributeType<Boolean> expanded()- Specified by:
expandedin interfaceSyMenuReadableType- Returns:
- An attribute that indicates if this menu is currently expanded
-
items
List<SyMenuItemType> items()- Returns:
- An immutable snapshot of the items within the menu