Class Rows

java.lang.Object
privbot.ui.overlay.Rows

public final class Rows extends Object
The rows of a HUD panel, composed fresh on every render.

Wraps a RuneLite PanelComponent with the handful of row shapes every plugin overlay ended up writing privately: label/value with a meaningful colour, a vital against a threshold, a progress bar (RuneLite's own ProgressBarComponent, which no plugin had used), and a runtime formatted by Time.format(Duration). Values may be null; they render as "-".

  • Method Details

    • panel

      public net.runelite.client.ui.overlay.components.PanelComponent panel()
      Access to the underlying component for anything the row shapes do not cover.
    • title

      public Rows title(String text)
      A title line in OverlayTheme.TITLE gold.
    • title

      public Rows title(String text, Color color)
      A title line in color; null text renders empty.
    • row

      public Rows row(String label, Object value)
      A plain label / value row.
    • row

      public Rows row(String label, Object value, Color valueColor)
      A label / value row whose value colour means something (OverlayTheme.GOOD etc).
    • rowIf

      public Rows rowIf(boolean condition, String label, Object value, Color valueColor)
      row(String, Object, Color) only when condition holds.
    • status

      public Rows status(String label, Object state, Color color)
      A state row: the value is a status word coloured by color.
    • fraction

      public Rows fraction(String label, int value, int max, ColorRamp ramp)
      value/max coloured by ramp; an unknown max renders as "-".
    • progress

      public Rows progress(String label, long value, long max)
      A progress bar value of max, OverlayTheme.INFO unless a colour is given.
    • progress

      public Rows progress(String label, long value, long max, Color color)
      A progress bar value of max in color, with value/max as its text.
    • progress

      public Rows progress(String label, double fraction, String valueText, Color color)
      A bar filled to fraction (0..1) with label on the left and valueText on the right, e.g. a level bar "Fishing ... 59 → 60". No computed "value/max" text is drawn.
    • runtime

      public Rows runtime(String label, Instant startedAt)
      Elapsed time since startedAt as hh:mm:ss; null start renders "-".
    • runtime

      public Rows runtime(String label, Duration elapsed)
      elapsed as hh:mm:ss in the muted colour; null renders "-".
    • text

      public Rows text(String line)
      A single line of muted text (no value column).
    • text

      public Rows text(String line, Color color)
      A single line of text in color (no value column).
    • divider

      public Rows divider()
      A thin spacer between groups of rows.
    • valueText

      public static String valueText(Object value)
      How a value renders: null and empty become a dash.