Add main window
This commit is contained in:
parent
48758b5a53
commit
477446bc39
1 changed files with 31 additions and 0 deletions
31
src/main/kotlin/org/bm00/data-accessor/ProgramWindow.kt
Normal file
31
src/main/kotlin/org/bm00/data-accessor/ProgramWindow.kt
Normal 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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue