Add main window

This commit is contained in:
nelle 2024-02-16 02:50:40 -07:00
parent 48758b5a53
commit 477446bc39

View file

@ -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)
}
}
)
}
}