pit/pit-swing/griffon-app/lifecycle/Initialize.groovy

25 lines
843 B
Groovy
Raw Normal View History

/*
2010-08-27 03:07:54 -05:00
* This script is executed inside the UI thread, so be sure to call
* long running code in another thread.
*
* You have the following options
2010-08-27 03:07:54 -05:00
* - execOutside { // your code }
* - execFuture { // your code }
* - Thread.start { // your code }
*
2010-08-27 03:07:54 -05:00
* You have the following options to run code again inside the UI thread
* - execAsync { // your code }
* - execSync { // your code }
*/
import groovy.swing.SwingBuilder
import griffon.util.GriffonPlatformHelper
2010-08-27 03:07:54 -05:00
import static griffon.util.GriffonApplicationUtils.*
GriffonPlatformHelper.tweakForNativePlatform(app)
SwingBuilder.lookAndFeel('org.pushingpixels.substance.api.skin.SubstanceCremeCoffeeLookAndFeel', 'nimbus', ['metal', [boldFonts: false]])
// make config directory
def confDir = new File(System.getProperty('user.home'), '.pit')
if (!confDir.exists()) confDir.mkdirs()