Module com.googlecode.lanterna
Package com.googlecode.lanterna.gui2
Interface AsynchronousTextGUIThread
- All Superinterfaces:
TextGUIThread
- All Known Implementing Classes:
SeparateTextGUIThread
Extended interface of TextGUIThread for implementations that uses a separate thread for all GUI event processing and
updating.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Enum representing the states of the GUI thread life-cycleNested classes/interfaces inherited from interface com.googlecode.lanterna.gui2.TextGUIThread
TextGUIThread.ExceptionHandler
-
Method Summary
Modifier and TypeMethodDescriptiongetState()
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
Blocks until the GUI loop has stoppedvoid
waitForStop
(long time, TimeUnit unit) Blocks until the GUI loop has stoppedMethods inherited from interface com.googlecode.lanterna.gui2.TextGUIThread
getThread, invokeAndWait, invokeLater, processEventsAndUpdate, setExceptionHandler
-
Method Details
-
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
Blocks until the GUI loop has stopped- Throws:
InterruptedException
- In case this thread was interrupted while waiting for the GUI thread to exit
-
waitForStop
Blocks until the GUI loop has stopped- Throws:
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
-