Module com.googlecode.lanterna
Package com.googlecode.lanterna.gui2
Interface AsynchronousTextGUIThread
-
- All Superinterfaces:
TextGUIThread
- All Known Implementing Classes:
SeparateTextGUIThread
public interface AsynchronousTextGUIThread extends TextGUIThread
Extended interface of TextGUIThread for implementations that uses a separate thread for all GUI event processing and updating.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AsynchronousTextGUIThread.State
Enum representing the states of the GUI thread life-cycle-
Nested classes/interfaces inherited from interface com.googlecode.lanterna.gui2.TextGUIThread
TextGUIThread.ExceptionHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AsynchronousTextGUIThread.State
getState()
Returns the current status of this GUI threadvoid
start()
Starts the AsynchronousTextGUIThread, typically meaning that the event processing loop will start.void
stop()
Requests that the AsynchronousTextGUIThread stops, typically meaning that the event processing loop will exitvoid
waitForStop()
Blocks until the GUI loop has stoppedvoid
waitForStop(long time, java.util.concurrent.TimeUnit unit)
Blocks until the GUI loop has stopped-
Methods inherited from interface com.googlecode.lanterna.gui2.TextGUIThread
getThread, invokeAndWait, invokeLater, processEventsAndUpdate, setExceptionHandler
-
-
-
-
Method Detail
-
start
void start()
Starts the AsynchronousTextGUIThread, typically meaning that the event processing loop will start.
-
stop
void stop()
Requests that the AsynchronousTextGUIThread stops, typically meaning that the event processing loop will exit
-
waitForStop
void waitForStop() throws java.lang.InterruptedException
Blocks until the GUI loop has stopped- Throws:
java.lang.InterruptedException
- In case this thread was interrupted while waiting for the GUI thread to exit
-
waitForStop
void waitForStop(long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
Blocks until the GUI loop has stopped- Throws:
java.lang.InterruptedException
- In case this thread was interrupted while waiting for the GUI thread to exit
-
getState
AsynchronousTextGUIThread.State getState()
Returns the current status of this GUI thread- Returns:
- Current status of the GUI thread
-
-