Class ActionListDialog
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 AbstractBasePane
AbstractBasePane.ContentHolderNested classes/interfaces inherited from interface Window
Window.Hint -
Field Summary
Fields inherited from class AbstractBasePane
contentHolder, interactableLookupMap -
Constructor Summary
ConstructorsConstructorDescriptionActionListDialog(String title, String description, TerminalSize actionListPreferredSize, boolean canCancel, boolean closeAutomatically, List<Runnable> actions) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidonCancel()static voidshowDialog(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 DialogWindow
showDialogMethods inherited from class 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, waitUntilClosedMethods inherited from class AbstractBasePane
addBasePaneListener, getBasePaneListeners, getComponent, getCursorPosition, getFocusedInteractable, getMenuBar, getTheme, invalidate, isInvalid, removeBasePaneListener, setComponent, setEnableDirectionBasedMovements, setFocusedInteractable, setFocusedInteractable, setMenuBar, setStrictFocusChange, setThemeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BasePane
getTheme, setEnableDirectionBasedMovements, setStrictFocusChange, setThemeMethods inherited from interface 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 eachRunnableby callingtoString()on each one
-