Class ThemedLoadingDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public final class ThemedLoadingDialog extends JDialog
Progress window for long tasks (opening a project, importing, installing the board driver). Shows a spinner, the current step, and a progress bar. A task that knows its stages up front lists them with setStages(java.lang.String...); the bar and "Step n of N" then move forward one stage at a time. Other tasks get a bar that slides until done. Colors come from the current theme so it matches the rest of Emrick Designer in dark and light mode.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • setCancelAction

      public void setCancelAction(Runnable cancelAction)
      Called if the user cancels (Cancel button or closing the window). Shows the Cancel button.
    • setStages

      public void setStages(String... titles)
      Lists the status titles this task will report, in order, so each one shows as its own numbered step. Stages a task ends up skipping are fine; the step just jumps ahead.
    • update

      public void update(String title, String detail)
    • requestCancel

      private void requestCancel()
    • buildLayout

      private JPanel buildLayout(String badgeText, String initialTitle, String initialDetail, String footerText)
    • prettify

      private static String prettify(String badge)
      "PROJECT LOAD" -> "Project load", so it reads as a label rather than a stamp.
    • styleWrapping

      private static void styleWrapping(JTextArea area, boolean muted)
    • startAnimation

      private void startAnimation()
    • stopAnimation

      private void stopAnimation()
    • baseFont

      private static Font baseFont()
    • accent

      private static Color accent()
    • muted

      private static Color muted()
    • track

      private static Color track()
    • blend

      private static Color blend(Color base, Color tint, float amount)