Mercurial > cgi-bin > hgweb.cgi > ImagePrep
annotate src/name/blackcap/imageprep/Main.kt @ 24:a4737a525af8
Fix icons a bit.
author | David Barts <n5jrn@me.com> |
---|---|
date | Wed, 25 Nov 2020 08:40:45 -0800 |
parents | 92afaa27f40a |
children | 098c4f5507c7 |
rev | line source |
---|---|
0 | 1 /* |
2 * Entry point, etc. | |
3 */ | |
4 package name.blackcap.imageprep | |
5 | |
4
5234e4500d45
Command-line arguments (only partially tested).
David Barts <n5jrn@me.com>
parents:
0
diff
changeset
|
6 import java.io.File |
0 | 7 import java.util.logging.Level |
8 import java.util.logging.Logger | |
4
5234e4500d45
Command-line arguments (only partially tested).
David Barts <n5jrn@me.com>
parents:
0
diff
changeset
|
9 import javax.swing.UIManager |
0 | 10 |
11 object Application { | |
12 /* name we call ourselves */ | |
13 val MYNAME = "ImagePrep" | |
14 | |
15 /* global UI objects */ | |
16 var mainFrame: MainFrame by setOnce() | |
17 var helpDialog: HelpDialog by setOnce() | |
19
5fa5d15b4a7b
Attempt to make it a std. app. Builds, sorta runs, needs more work.
David Barts <n5jrn@me.com>
parents:
5
diff
changeset
|
18 var settingsDialog: SettingsDialog by setOnce() |
0 | 19 |
20 fun initialize() { | |
21 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); | |
22 mainFrame = MainFrame() /* must be created first */ | |
19
5fa5d15b4a7b
Attempt to make it a std. app. Builds, sorta runs, needs more work.
David Barts <n5jrn@me.com>
parents:
5
diff
changeset
|
23 settingsDialog = SettingsDialog() |
0 | 24 mainFrame.jMenuBar = MyMenuBar() |
25 setMacMenus() /* always safe to call; no-op if not a Mac */ | |
26 helpDialog = HelpDialog() | |
27 mainFrame.setVisible(true) | |
28 } | |
29 } | |
30 | |
31 fun main(args: Array<String>) { | |
5
884f1415a330
Rationalized directory management.
David Barts <n5jrn@me.com>
parents:
4
diff
changeset
|
32 /* start up */ |
0 | 33 LOGGER.log(Level.INFO, "beginning execution") |
34 if (OS.type == OS.MAC) { | |
35 System.setProperty("apple.laf.useScreenMenuBar", "true") | |
36 } | |
4
5234e4500d45
Command-line arguments (only partially tested).
David Barts <n5jrn@me.com>
parents:
0
diff
changeset
|
37 |
5
884f1415a330
Rationalized directory management.
David Barts <n5jrn@me.com>
parents:
4
diff
changeset
|
38 /* launch GUI */ |
0 | 39 inSwingThread { |
40 Application.initialize() | |
41 } | |
42 } |