TextGUI
MultiWindowTextGUI
public interface WindowBasedTextGUI extends TextGUI
TextGUI.Listener
Modifier and Type | Method | Description |
---|---|---|
WindowBasedTextGUI |
addWindow(Window window) |
Adds a window to the TextGUI system, depending on the window manager this window may or may not be immediately
visible.
|
WindowBasedTextGUI |
addWindowAndWait(Window window) |
Adds a window to the TextGUI system, depending on the window manager this window may or may not be immediately
visible.
|
WindowBasedTextGUI |
cycleActiveWindow(boolean reverse) |
Takes the previously active window and makes it active, or if in reverse mode, takes the window at the bottom of
the stack, moves it to the front and makes it active.
|
Window |
getActiveWindow() |
Returns the window which the TextGUI considers the active one at the time of the method call.
|
BasePane |
getBackgroundPane() |
Returns the container for the background, which works as a single large component that takes up the whole
terminal area and is always behind all windows.
|
WindowManager |
getWindowManager() |
Returns the window manager that is currently controlling this TextGUI.
|
WindowPostRenderer |
getWindowPostRenderer() |
Returns the
WindowPostRenderer for this WindowBasedTextGUI |
Collection<Window> |
getWindows() |
Returns a list of all windows currently in the TextGUI.
|
WindowBasedTextGUI |
moveToTop(Window window) |
Windows are internally stored as a stack and newer windows are added at the top of the stack.
|
WindowBasedTextGUI |
removeWindow(Window window) |
Removes a window from the TextGUI.
|
WindowBasedTextGUI |
setActiveWindow(Window activeWindow) |
Selects a particular window to be considered 'active' and receive all input events
|
void |
waitForWindowToClose(Window abstractWindow) |
Waits for the specified window to be closed
|
addListener, getFocusedInteractable, getGUIThread, getScreen, getTheme, isPendingUpdate, processInput, removeListener, setTheme, setVirtualScreenEnabled, updateScreen
WindowManager getWindowManager()
WindowBasedTextGUI addWindow(Window window)
addWindowAndWait(..)
.
Windows are internally stored as a stack and newer windows are added at the top of the stack. The GUI system will
render windows in a predictable order from bottom to top. You can modify the stack by using
moveToTop(..)
to move a Window from its current position in the stack to the top.window
- Window to add to the GUIWindowBasedTextGUI addWindowAndWait(Window window)
addWindow(..)
. This method call is useful for modal dialogs that requires a certain user input
before the application can continue.
Windows are internally stored as a stack and newer windows are added at the top of the stack. The GUI system will
render windows in a predictable order from bottom to top. You can modify the stack by using
moveToTop(..)
to move a Window from its current position in the stack to the top.window
- Window to add to the GUIWindowBasedTextGUI removeWindow(Window window)
window
- Window to closeCollection<Window> getWindows()
WindowBasedTextGUI setActiveWindow(Window activeWindow)
activeWindow
- Window to become active and receive input eventsWindow getActiveWindow()
null
BasePane getBackgroundPane()
BasePane
used by this WindowBasedTextGUI
WindowPostRenderer getWindowPostRenderer()
WindowPostRenderer
for this WindowBasedTextGUI
WindowPostRenderer
for this WindowBasedTextGUI
WindowBasedTextGUI moveToTop(Window window)
window
- Window in the stack to move to the top positionWindowBasedTextGUI cycleActiveWindow(boolean reverse)
reverse
- Direction to cycle through the windowsvoid waitForWindowToClose(Window abstractWindow)
abstractWindow
- Window to wait forCopyright © 2020. All rights reserved.