Class DevUI

java.lang.Object
org.emrick.project.dev.DevUI

final class DevUI extends Object
Shared look for Developer Mode: rounded cards, status pills, gold primary buttons, and table styling. Colors are read from the current FlatLaf theme at paint time, so everything follows dark/light mode.
  • Field Details

  • Constructor Details

    • DevUI

      private DevUI()
  • Method Details

    • dark

      static boolean dark()
    • accent

      static Color accent()
    • background

      static Color background()
    • cardBackground

      static Color cardBackground()
    • cardBorder

      static Color cardBorder()
    • muted

      static Color muted()
    • tone

      static Color tone(DevUI.Tone tone)
    • blend

      static Color blend(Color a, Color b, float amount)
    • body

      static Font body()
    • heading

      static Font heading()
    • subheading

      static Font subheading()
    • section

      static JLabel section(String text)
      Section name inside a card, styled like the app's titled borders.
    • date

      static String date(String isoDate)
      Firmware dates are stored as YYYY-MM-DD; people see MM-DD-YYYY. Anything else is shown unchanged.
    • wrappingCaption

      static JTextArea wrappingCaption(String text)
      Muted text that wraps to the available width instead of being cut off with "...".
    • reflowScroll

      static JScrollPane reflowScroll(JComponent content)
      Wraps content so it reflows to the window width and scrolls vertically only when it doesn't fit.
    • unitNameRenderer

      static ListCellRenderer<Object> unitNameRenderer()
      Shows ports in a dropdown by what's plugged in (board label, else "Board 12", else unit type) with the COM port in gray after it. The dropdown's values stay the port names. Other entries are shown as-is.
    • escape

      private static String escape(String s)
    • title

      static JLabel title(String text)
    • caption

      static JLabel caption(String text)
    • primary

      static JButton primary(String text)
      Gold call-to-action button. Looks like a normal button while disabled so it doesn't read as clickable.
    • setPrimary

      static void setPrimary(JButton b, boolean primary)
      Switches a primary(java.lang.String) button between gold and plain (e.g. Connect is gold, Disconnect is plain).
    • applyPrimaryStyle

      private static void applyPrimaryStyle(JButton b)
    • secondary

      static JButton secondary(String text)
      Neutral button with comfortable padding.
    • danger

      static JButton danger(String text)
      Red-outlined button for actions that stop or turn things off.
    • field

      static JTextField field(int columns, String placeholder)
    • keycap

      static JLabel keycap(String key)
      Keyboard key hint, e.g. "Space".
    • styleTable

      static void styleTable(JTable table)
      Clean, roomy table look: no vertical grid lines, taller rows, bold header.
    • borderless

      static JScrollPane borderless(JComponent view)
      Scroll pane without its own border, for tables inside a card.
    • emptyState

      static JPanel emptyState(String headline, String detail)
      Big centered message for empty lists, e.g. "Plug in a unit".
    • clear

      static JPanel clear(LayoutManager layout)
      Transparent panel, handy for layout wrappers inside cards.