- 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
-
public class ActionListDialog extends DialogWindow
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
Constructors Constructor Description ActionListDialog(java.lang.String title, java.lang.String description, TerminalSize actionListPreferredSize, boolean canCancel, boolean closeAutomatically, java.util.List<java.lang.Runnable> actions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
onCancel()
static void
showDialog(WindowBasedTextGUI textGUI, java.lang.String title, java.lang.String description, java.lang.Runnable... items)
Helper method for immediately displaying aActionListDialog
, the method will return when the dialog is closed-
Methods 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 Detail
-
ActionListDialog
ActionListDialog(java.lang.String title, java.lang.String description, TerminalSize actionListPreferredSize, boolean canCancel, boolean closeAutomatically, java.util.List<java.lang.Runnable> actions)
-
-
Method Detail
-
onCancel
private void onCancel()
-
showDialog
public static void showDialog(WindowBasedTextGUI textGUI, java.lang.String title, java.lang.String description, java.lang.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
-
-