Class Menu
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 MenuItem
MenuItem.DefaultMenuItemRenderer, MenuItem.MenuItemRendererNested classes/interfaces inherited from interface Interactable
Interactable.FocusChangeDirection, Interactable.Result -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class MenuItem
createDefaultRenderer, getLabel, handleKeyStrokeMethods inherited from class AbstractInteractableComponent
afterEnterFocus, afterLeaveFocus, getCursorLocation, getInputFilter, getRenderer, handleInput, isActivationStroke, isEnabled, isFocusable, isFocused, isKeyboardActivationStroke, isMouseActivationStroke, isMouseDown, isMouseDrag, isMouseMove, isMouseUp, onEnterFocus, onLeaveFocus, setEnabled, setInputFilter, takeFocusMethods inherited from class 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, withBorderMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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, withBorderMethods inherited from interface 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:MenuItemMethod to invoke when a menu item is "activated" by pressing the Enter key.- Overrides:
onActivatedin classMenuItem- Returns:
- Returns
trueif the action was performed successfully, otherwisefalse, which will not automatically close the popup window itself.