Class StudioPanel

java.lang.Object
me.hackware.api.gui.studio.StudioPanel

public final class StudioPanel extends Object
The shared chrome + metrics for a Studio card panel, so every panel matches: a rounded categoriesBackgroundColor body, a darkened header strip with a hairline divider under it, and a 1px border drawn last. Callers draw their own header content (title, count, column labels) at headerTextY(me.hackware.api.gui.UiContext, int) and fill the body inside PAD. The constants (HEADER_H, PAD, GAP) are the single source for panel spacing across Studio screens.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Horizontal inset for body content (rows, buttons, tables) — matches the wheel-properties card's row cards, which sit at footerPad(4) + rowInset(4) from the card edge, so the Command and Wheels card bodies line up with it.
    static final int
    Gap between panels / columns and between stacked panel rows.
    static final int
    Header strip height.
    static final int
    Horizontal inset for header text (title / count) — matches the pinned properties window's title inset (its rowInsetX()+5) and the footer "Macros" heading, so Studio card headings line up with the wheel-properties card.
    static final int
    Inner content padding (vertical breathing room; horizontal picker/popup inset).
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    border(UiContext ui, int x, int y, int w, int h)
    Outer 1px border — call last so it caps the header divider ends.
    static void
    chrome(UiContext ui, int x, int y, int w, int h)
    Body + darkened header + divider.
    static void
    header(UiContext ui, int x, int y, int w, String title, String count)
    Draws a header title on the left and an optional muted count on the right.
    static int
    headerTextY(UiContext ui, int y)
    Baseline Y for header-row text, vertically centred in the header strip.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • HEADER_H

      public static final int HEADER_H
      Header strip height.
      See Also:
    • PAD

      public static final int PAD
      Inner content padding (vertical breathing room; horizontal picker/popup inset).
      See Also:
    • BODY_PAD

      public static final int BODY_PAD
      Horizontal inset for body content (rows, buttons, tables) — matches the wheel-properties card's row cards, which sit at footerPad(4) + rowInset(4) from the card edge, so the Command and Wheels card bodies line up with it.
      See Also:
    • HEADER_PAD

      public static final int HEADER_PAD
      Horizontal inset for header text (title / count) — matches the pinned properties window's title inset (its rowInsetX()+5) and the footer "Macros" heading, so Studio card headings line up with the wheel-properties card.
      See Also:
    • GAP

      public static final int GAP
      Gap between panels / columns and between stacked panel rows.
      See Also:
  • Method Details

    • chrome

      public static void chrome(UiContext ui, int x, int y, int w, int h)
      Body + darkened header + divider. Draw header content and body, then call border(me.hackware.api.gui.UiContext, int, int, int, int).
    • headerTextY

      public static int headerTextY(UiContext ui, int y)
      Baseline Y for header-row text, vertically centred in the header strip.
    • header

      public static void header(UiContext ui, int x, int y, int w, String title, String count)
      Draws a header title on the left and an optional muted count on the right.
    • border

      public static void border(UiContext ui, int x, int y, int w, int h)
      Outer 1px border — call last so it caps the header divider ends.