- 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.WaitingDialog
-
public class WaitingDialog extends DialogWindow
Dialog that displays a text message, an optional spinning indicator and an optional progress bar. There is no buttons in this dialog so it has to be explicitly closed through code.
-
-
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 Modifier Constructor Description privateWaitingDialog(java.lang.String title, java.lang.String text)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WaitingDialogcreateDialog(java.lang.String title, java.lang.String text)Creates a new waiting dialogjava.lang.ObjectshowDialog(WindowBasedTextGUI textGUI)Opens the dialog by showing it on the GUI and doesn't return until the dialog has been closedvoidshowDialog(WindowBasedTextGUI textGUI, boolean blockUntilClosed)Displays the waiting dialog and optionally blocks until another thread closes itstatic WaitingDialogshowDialog(WindowBasedTextGUI textGUI, java.lang.String title, java.lang.String text)Creates and displays a waiting dialog without blocking for it to finish-
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
-
-
-
-
Method Detail
-
showDialog
public java.lang.Object showDialog(WindowBasedTextGUI textGUI)
Description copied from class:DialogWindowOpens the dialog by showing it on the GUI and doesn't return until the dialog has been closed- Overrides:
showDialogin classDialogWindow- Parameters:
textGUI- Text GUI to add the dialog to- Returns:
- Depending on the
DialogWindowimplementation, by defaultnull
-
showDialog
public void showDialog(WindowBasedTextGUI textGUI, boolean blockUntilClosed)
Displays the waiting dialog and optionally blocks until another thread closes it- Parameters:
textGUI- GUI to add the dialog toblockUntilClosed- Iftrue, the method call will block until another thread callsclose()on the dialog, otherwise the method call returns immediately
-
createDialog
public static WaitingDialog createDialog(java.lang.String title, java.lang.String text)
Creates a new waiting dialog- Parameters:
title- Title of the waiting dialogtext- Text to display on the waiting dialog- Returns:
- Created waiting dialog
-
showDialog
public static WaitingDialog showDialog(WindowBasedTextGUI textGUI, java.lang.String title, java.lang.String text)
Creates and displays a waiting dialog without blocking for it to finish- Parameters:
textGUI- GUI to add the dialog totitle- Title of the waiting dialogtext- Text to display on the waiting dialog- Returns:
- Created waiting dialog
-
-