java.lang.Object
com.googlecode.lanterna.gui2.AbstractComponent<MenuItem>
com.googlecode.lanterna.gui2.AbstractInteractableComponent<MenuItem>
com.googlecode.lanterna.gui2.menu.MenuItem
com.googlecode.lanterna.gui2.menu.Menu
- All Implemented Interfaces:
Component
,Interactable
,TextGUIElement
-
Nested Class Summary
Nested classes/interfaces inherited from class com.googlecode.lanterna.gui2.menu.MenuItem
MenuItem.DefaultMenuItemRenderer, MenuItem.MenuItemRenderer
Nested classes/interfaces inherited from interface com.googlecode.lanterna.gui2.Interactable
Interactable.FocusChangeDirection, Interactable.Result
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.googlecode.lanterna.gui2.menu.MenuItem
createDefaultRenderer, getLabel, handleKeyStroke
Methods inherited from class com.googlecode.lanterna.gui2.AbstractInteractableComponent
afterEnterFocus, afterLeaveFocus, getCursorLocation, getInputFilter, getRenderer, handleInput, isActivationStroke, isEnabled, isFocusable, isFocused, isKeyboardActivationStroke, isMouseActivationStroke, isMouseDown, isMouseDrag, isMouseMove, isMouseUp, onEnterFocus, onLeaveFocus, setEnabled, setInputFilter, takeFocus
Methods inherited from class com.googlecode.lanterna.gui2.AbstractComponent
addTo, calculatePreferredSize, draw, getBasePane, getGlobalPosition, getLayoutData, getParent, getPosition, getPreferredSize, getSize, getTextGUI, getTheme, getThemeDefinition, hasParent, invalidate, isInside, isInvalid, isVisible, onAdded, onAfterDrawing, onBeforeDrawing, onRemoved, runOnGUIThreadIfExistsOtherwiseRunDirect, self, setLayoutData, setPosition, setPreferredSize, setRenderer, setSize, setTheme, setVisible, toBasePane, toGlobal, withBorder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.googlecode.lanterna.gui2.Component
addTo, getBasePane, getGlobalPosition, getLayoutData, getParent, getPosition, getPreferredSize, getSize, getTextGUI, getTheme, getThemeDefinition, hasParent, invalidate, isInside, isVisible, onAdded, onRemoved, setLayoutData, setPosition, setPreferredSize, setSize, setTheme, setVisible, toBasePane, toGlobal, withBorder
Methods inherited from interface com.googlecode.lanterna.gui2.TextGUIElement
draw, isInvalid
-
Field Details
-
subItems
-
-
Constructor Details
-
Menu
Creates a menu with the specified label- Parameters:
label
- Label to use for the menu item that will trigger this menu to pop up
-
-
Method Details
-
onActivated
protected boolean onActivated()Description copied from class:MenuItem
Method to invoke when a menu item is "activated" by pressing the Enter key.- Overrides:
onActivated
in classMenuItem
- Returns:
- Returns
true
if the action was performed successfully, otherwisefalse
, which will not automatically close the popup window itself.