Class GRootPanel
java.lang.Object
com.glitchybyte.glib.terminal.display.GPanel
com.glitchybyte.glib.terminal.display.GRootPanel
Terminal UI root panel that contains all other panels.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAwaits for a panel to be dirty.voiddraw()Draws the whole UI, all panels.static GDisplayDataTaskgetData()Returns an object to read and write data for the display.voidRefreshes imprints for all dirty panels.voidsignalDirty(GPanel panel) Signals the given panel's contents have changed and needs to be refreshed.Methods inherited from class com.glitchybyte.glib.terminal.display.GPanel
addPanel, createImprint, drawPanel, fill, fillBackground, getXOffset, getYOffset, moveToXOffset, refresh, refreshAll, signalDirty
-
Constructor Details
-
GRootPanel
public GRootPanel(int width, int height) Creates a root panel.- Parameters:
width- Panel width.height- Panel height.
-
-
Method Details
-
getData
Returns an object to read and write data for the display.- Returns:
- An object to read and write data for the display.
-
awaitDirty
Awaits for a panel to be dirty.- Throws:
InterruptedException- If the thread is interrupted while waiting.
-
refreshDirty
public void refreshDirty()Refreshes imprints for all dirty panels. -
signalDirty
Signals the given panel's contents have changed and needs to be refreshed.- Parameters:
panel- Panel that needs to be refreshed.
-
draw
public void draw()Draws the whole UI, all panels.
-