Class ThemeEditorApp

java.lang.Object
limn.themeeditor.ThemeEditorApp

public final class ThemeEditorApp extends Object
The theme editor as a program you run, rather than a screen you embed.

ThemeEditor is a widget, and that is the module's whole point: an application drops it into a settings screen and gets palette authoring. But a designer who wants to build a palette should not have to write an application first, so this is the same widget in a window of its own, with nothing around it that the embeddable version does not also offer.


 ./gradlew :limn-theme-editor:run
 ./gradlew :limn-theme-editor:run --args="brand.limntheme"
 

The backend is not a dependency of this module's library half. It is compileOnly plus runtimeOnly, so this class compiles and runs while the published jar still declares only limn-toolkit. An application that embeds ThemeEditor therefore does not inherit a window toolkit it already has, and the module keeps the property its build file opens with: nothing depends on it, and it depends on as little as it can.

Everything here is a call an embedding application would also make. The editor applies what it edits as it is edited, so the window re-skins under the user's hands, which is the honest preview and needs no wiring from this file.

  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Opens the editor on a palette, and prints what it produced when the window closes.

      Printing rather than writing a file: where a palette belongs is the application's decision, which is the same reason ThemeEditorFiles is optional and separate. Standard output is the one destination that is nobody's convention, so it can be redirected into whichever one the reader has.

      Parameters:
      args - an optional .limntheme file to open; without one the editor starts on the palette the window is wearing
      Throws:
      Exception