Package org.inspirenxe.strata.swing


package org.inspirenxe.strata.swing
The Java2D/Swing adapter.

Most code needs only StrataPanel, which shows a stack of screens in a Swing window, or SwingSnapshot, which renders a screen to an image without a display. To host Strata in other Java2D code, use the SPI pieces directly: SwingPlatform and SwingCanvas, with SwingInput to translate AWT key and button codes.

Sprites load through SwingSprites: from the class path, at assets/<namespace>/sprites/<path>.png unless a SpriteResolver names another place, or from anywhere a SpriteSource reads. Images drawn for denser displays sit beside them as <path>@2x.png and <path>@1.5x.png. SwingThemeSource finds theme files at assets/<namespace>/themes/<path>.json unless a ThemePathResolver names another place. Fonts are SwingFonts held by SwingTextMetrics: an AwtFont or a BitmapFont. SwingTranslations sets where translated text comes from, and SwingVisuals makes visuals of BufferedImages.

Like Swing itself, the classes here must be used on the Swing event thread unless their documentation says otherwise.