java.lang.Object
com.googlecode.lanterna.gui2.AbstractBasePane<Window>
com.googlecode.lanterna.gui2.AbstractWindow
com.googlecode.lanterna.gui2.dialogs.DialogWindow
com.googlecode.lanterna.gui2.dialogs.ActionListDialog
Dialog containing a multiple item action list box
-
Nested Class Summary
Nested classes/interfaces inherited from class com.googlecode.lanterna.gui2.AbstractBasePane
AbstractBasePane.ContentHolder
Nested classes/interfaces inherited from interface com.googlecode.lanterna.gui2.Window
Window.Hint
-
Field Summary
Fields inherited from class com.googlecode.lanterna.gui2.AbstractBasePane
contentHolder, interactableLookupMap
-
Constructor Summary
ConstructorsConstructorDescriptionActionListDialog
(String title, String description, TerminalSize actionListPreferredSize, boolean canCancel, boolean closeAutomatically, List<Runnable> actions) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
onCancel()
static void
showDialog
(WindowBasedTextGUI textGUI, String title, String description, Runnable... items) Helper method for immediately displaying aActionListDialog
, the method will return when the dialog is closedMethods inherited from class com.googlecode.lanterna.gui2.dialogs.DialogWindow
showDialog
Methods inherited from class com.googlecode.lanterna.gui2.AbstractWindow
addWindowListener, close, draw, fromGlobal, fromGlobalToContentRelative, fromGlobalToDecoratedRelative, getDecoratedSize, getHints, getPosition, getPostRenderer, getPreferredSize, getSize, getTextGUI, getTitle, handleInput, isVisible, removeWindowListener, setCloseWindowWithEscape, setContentOffset, setDecoratedSize, setFixedSize, setHints, setPosition, setSize, setTextGUI, setTitle, setVisible, setWindowPostRenderer, toGlobal, toGlobalFromContentRelative, toGlobalFromDecoratedRelative, waitUntilClosed
Methods inherited from class com.googlecode.lanterna.gui2.AbstractBasePane
addBasePaneListener, getBasePaneListeners, getComponent, getCursorPosition, getFocusedInteractable, getMenuBar, getTheme, invalidate, isInvalid, removeBasePaneListener, setComponent, setEnableDirectionBasedMovements, setFocusedInteractable, setFocusedInteractable, setMenuBar, setStrictFocusChange, setTheme
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.BasePane
getTheme, setEnableDirectionBasedMovements, setStrictFocusChange, setTheme
Methods inherited from interface com.googlecode.lanterna.gui2.Window
getBounds, getComponent, getCursorPosition, getFocusedInteractable, getMenuBar, invalidate, isInvalid, setComponent, setFocusedInteractable, setMenuBar
-
Constructor Details
-
ActionListDialog
ActionListDialog(String title, String description, TerminalSize actionListPreferredSize, boolean canCancel, boolean closeAutomatically, List<Runnable> actions)
-
-
Method Details
-
onCancel
private void onCancel() -
showDialog
public static void showDialog(WindowBasedTextGUI textGUI, String title, String description, Runnable... items) Helper method for immediately displaying aActionListDialog
, the method will return when the dialog is closed- Parameters:
textGUI
- Text GUI the dialog should be added totitle
- Title of the dialogdescription
- Description of the dialogitems
- Items in theActionListBox
, the label will be taken from eachRunnable
by callingtoString()
on each one
-