Package com.onec.desktop
Interface DesktopApp
public interface DesktopApp
An authored desktop shell — the structural peer of
Layout.
One DesktopApp bean describes how this onec application presents itself
as a native window: its title, window geometry, system-tray behaviour and the
splash shown while the embedded server boots.
The shell itself (Tauri) ships generic and dumb: at launch it boots the
embedded JVM, polls /api/desktop/ready, then asks the server for this
manifest via /api/desktop/manifest and draws the window accordingly.
That keeps window configuration as config-as-code — a single typed source of
truth in Java — instead of a hand-edited tauri.conf.json.
@Component
class RentalsDesktop implements DesktopApp {
public void configure(DesktopSpec app) {
app.title("Rentals ERP")
.window(w -> w.size(1400, 900).minSize(1024, 720))
.singleInstance(true)
.tray(t -> t.tooltip("Rentals").quit("Quit"))
.splash("Starting Rentals ERP…");
}
}
If no DesktopApp bean is present, a sensible default is supplied
(application name as title, 1280×800), so dropping the starter on the
classpath is enough to ship a window.
-
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(DesktopSpec spec) Build this application's window title, geometry, tray and splash.
-
Method Details
-
configure
Build this application's window title, geometry, tray and splash.
-