From 477446bc39c80eef83f4daff2409228003d7fcc3 Mon Sep 17 00:00:00 2001 From: limepotato Date: Fri, 16 Feb 2024 02:50:40 -0700 Subject: [PATCH] Add main window --- .../org/bm00/data-accessor/ProgramWindow.kt | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/main/kotlin/org/bm00/data-accessor/ProgramWindow.kt diff --git a/src/main/kotlin/org/bm00/data-accessor/ProgramWindow.kt b/src/main/kotlin/org/bm00/data-accessor/ProgramWindow.kt new file mode 100644 index 0000000..890edc9 --- /dev/null +++ b/src/main/kotlin/org/bm00/data-accessor/ProgramWindow.kt @@ -0,0 +1,31 @@ +package org.bm00.`data-accessor` + +import jexer.TAction +import jexer.TApplication +import jexer.TWindow +import jexer.layout.StretchLayoutManager +import java.io.IOException +import java.util.* + +class ProgramWindow private constructor(parent: TApplication, flags: Int) : + TWindow(parent, "O.S.D.A.", 0, 0, Config().windowWidth, Config().windowHeight, flags) { + constructor(parent: TApplication) : this(parent, CENTERED) + init { + setLayoutManager( + StretchLayoutManager( + width - 2, + height - 2 + ) + ) + addLabel("Welcome to The ORG-NAME-WIP Secure Data Accessor - OSDA", CENTERED, CENTERED - 4) + + + addButton("Exit...", CENTERED + 14, CENTERED + 6, + object : TAction() { + override fun DO() { + System.exit(0) + } + } + ) + } +}