Class GRootPanel

java.lang.Object
com.glitchybyte.glib.terminal.display.GPanel
com.glitchybyte.glib.terminal.display.GRootPanel

public abstract class GRootPanel extends GPanel
Terminal UI root panel that contains all other panels.
  • Constructor Details

    • GRootPanel

      public GRootPanel(int width, int height)
      Creates a root panel.
      Parameters:
      width - Panel width.
      height - Panel height.
  • Method Details

    • getData

      public static GDisplayDataTask getData()
      Returns an object to read and write data for the display.
      Returns:
      An object to read and write data for the display.
    • awaitDirty

      public void awaitDirty() throws InterruptedException
      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

      public void signalDirty(GPanel panel)
      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.