Upgrading to Griffon 1.2.0
191
griffon-app/conf/BuildConfig.groovy
Normal file
@ -0,0 +1,191 @@
|
||||
// key signing information
|
||||
environments {
|
||||
development {
|
||||
signingkey {
|
||||
params {
|
||||
// sigfile = 'GRIFFON'
|
||||
// keystore = "${basedir}/griffon-app/conf/keys/devKeystore"
|
||||
// alias = 'development'
|
||||
storepass = 'BadStorePassword'
|
||||
keypass = 'BadKeyPassword'
|
||||
lazy = true // only sign when unsigned
|
||||
}
|
||||
}
|
||||
}
|
||||
test {
|
||||
griffon {
|
||||
jars {
|
||||
sign = false
|
||||
pack = false
|
||||
}
|
||||
}
|
||||
}
|
||||
production {
|
||||
signingkey {
|
||||
params {
|
||||
// NOTE: for production keys it is more secure to rely on key prompting
|
||||
// no value means we will prompt //storepass = 'BadStorePassword'
|
||||
// no value means we will prompt //keypass = 'BadKeyPassword'
|
||||
lazy = false // sign, regardless of existing signatures
|
||||
}
|
||||
}
|
||||
|
||||
griffon {
|
||||
jars {
|
||||
sign = true
|
||||
pack = true
|
||||
destDir = "${basedir}/staging"
|
||||
}
|
||||
webstart {
|
||||
codebase = 'CHANGE ME'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
griffon {
|
||||
memory {
|
||||
//max = '64m'
|
||||
//min = '2m'
|
||||
//minPermSize = '2m'
|
||||
//maxPermSize = '64m'
|
||||
}
|
||||
jars {
|
||||
sign = false
|
||||
pack = false
|
||||
destDir = "${basedir}/staging"
|
||||
jarName = "${appName}.jar"
|
||||
}
|
||||
extensions {
|
||||
jarUrls = []
|
||||
jnlpUrls = []
|
||||
/*
|
||||
props {
|
||||
someProperty = 'someValue'
|
||||
}
|
||||
resources {
|
||||
linux { // windows, macosx, solaris
|
||||
jars = []
|
||||
nativelibs = []
|
||||
props {
|
||||
someProperty = 'someValue'
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
webstart {
|
||||
codebase = "${new File(griffon.jars.destDir).toURI().toASCIIString()}"
|
||||
jnlp = 'application.jnlp'
|
||||
}
|
||||
applet {
|
||||
jnlp = 'applet.jnlp'
|
||||
html = 'applet.html'
|
||||
}
|
||||
}
|
||||
|
||||
// required for custom environments
|
||||
signingkey {
|
||||
params {
|
||||
def env = griffon.util.Environment.current.name
|
||||
sigfile = 'GRIFFON-' + env
|
||||
keystore = "${basedir}/griffon-app/conf/keys/${env}Keystore"
|
||||
alias = env
|
||||
// storepass = 'BadStorePassword'
|
||||
// keypass = 'BadKeyPassword'
|
||||
lazy = true // only sign when unsigned
|
||||
}
|
||||
}
|
||||
|
||||
griffon {
|
||||
doc {
|
||||
logo = '<a href="http://griffon-framework.org" target="_blank"><img alt="The Griffon Framework" src="../img/griffon.png" border="0"/></a>'
|
||||
sponsorLogo = "<br/>"
|
||||
footer = "<br/><br/>Made with Griffon (@griffon.version@)"
|
||||
}
|
||||
}
|
||||
|
||||
deploy {
|
||||
application {
|
||||
title = "${appName} ${appVersion}"
|
||||
vendor = System.properties['user.name']
|
||||
homepage = "http://localhost/${appName}"
|
||||
description {
|
||||
complete = "${appName} ${appVersion}"
|
||||
oneline = "${appName} ${appVersion}"
|
||||
minimal = "${appName} ${appVersion}"
|
||||
tooltip = "${appName} ${appVersion}"
|
||||
}
|
||||
icon {
|
||||
'default' {
|
||||
name = 'griffon-icon-64x64.png'
|
||||
width = '64'
|
||||
height = '64'
|
||||
}
|
||||
splash {
|
||||
name = 'griffon.png'
|
||||
width = '391'
|
||||
height = '123'
|
||||
}
|
||||
selected {
|
||||
name = 'griffon-icon-64x64.png'
|
||||
width = '64'
|
||||
height = '64'
|
||||
}
|
||||
disabled {
|
||||
name = 'griffon-icon-64x64.png'
|
||||
width = '64'
|
||||
height = '64'
|
||||
}
|
||||
rollover {
|
||||
name = 'griffon-icon-64x64.png'
|
||||
width = '64'
|
||||
height = '64'
|
||||
}
|
||||
shortcut {
|
||||
name = 'griffon-icon-64x64.png'
|
||||
width = '64'
|
||||
height = '64'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
griffon.project.dependency.resolution = {
|
||||
// inherit Griffon' default dependencies
|
||||
inherits("global") {
|
||||
}
|
||||
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
|
||||
repositories {
|
||||
griffonHome()
|
||||
|
||||
// uncomment the below to enable remote dependency resolution
|
||||
// from public Maven repositories
|
||||
//mavenLocal()
|
||||
//mavenCentral()
|
||||
//mavenRepo "http://snapshots.repository.codehaus.org"
|
||||
//mavenRepo "http://repository.codehaus.org"
|
||||
//mavenRepo "http://download.java.net/maven/2/"
|
||||
//mavenRepo "http://repository.jboss.com/maven2/"
|
||||
}
|
||||
dependencies {
|
||||
// specify dependencies here under either 'build', 'compile', 'runtime' or 'test' scopes eg.
|
||||
|
||||
// runtime 'mysql:mysql-connector-java:5.1.5'
|
||||
}
|
||||
}
|
||||
|
||||
log4j = {
|
||||
// Example of changing the log pattern for the default console
|
||||
// appender:
|
||||
appenders {
|
||||
console name: 'stdout', layout: pattern(conversionPattern: '%d [%t] %-5p %c - %m%n')
|
||||
}
|
||||
|
||||
error 'org.codehaus.griffon',
|
||||
'org.springframework',
|
||||
'org.apache.karaf',
|
||||
'groovyx.net'
|
||||
warn 'griffon'
|
||||
}
|
||||
|
6
griffon-app/conf/Builder.groovy
Executable file → Normal file
@ -1,9 +1,7 @@
|
||||
|
||||
root {
|
||||
'groovy.swing.SwingBuilder' {
|
||||
controller = ['Threading']
|
||||
view = '*'
|
||||
}
|
||||
'griffon.app.ApplicationBuilder' {
|
||||
view = '*'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
103
griffon-app/conf/Config.groovy
Executable file → Normal file
@ -1,94 +1,15 @@
|
||||
// log4j configuration
|
||||
log4j {
|
||||
appender.stdout = 'org.apache.log4j.ConsoleAppender'
|
||||
appender.'stdout.layout'='org.apache.log4j.PatternLayout'
|
||||
appender.'stdout.layout.ConversionPattern'='[%r] %c{2} %m%n'
|
||||
appender.errors = 'org.apache.log4j.FileAppender'
|
||||
appender.'errors.layout'='org.apache.log4j.PatternLayout'
|
||||
appender.'errors.layout.ConversionPattern'='[%r] %c{2} %m%n'
|
||||
appender.'errors.File'='stacktrace.log'
|
||||
rootLogger='error,stdout'
|
||||
logger {
|
||||
griffon='error'
|
||||
StackTrace='error,errors'
|
||||
org {
|
||||
codehaus.griffon.commons='info' // core / classloading
|
||||
}
|
||||
log4j = {
|
||||
// Example of changing the log pattern for the default console
|
||||
// appender:
|
||||
appenders {
|
||||
console name: 'stdout', layout: pattern(conversionPattern: '%d [%t] %-5p %c - %m%n')
|
||||
}
|
||||
additivity.StackTrace=false
|
||||
|
||||
error 'org.codehaus.griffon'
|
||||
|
||||
info 'griffon.util',
|
||||
'griffon.core',
|
||||
'griffon.@application.toolkit@',
|
||||
'griffon.app'
|
||||
}
|
||||
|
||||
// key signing information
|
||||
environments {
|
||||
development {
|
||||
signingkey {
|
||||
params {
|
||||
sigfile = 'GRIFFON'
|
||||
keystore = "${basedir}/griffon-app/conf/keys/devKeystore"
|
||||
alias = 'development'
|
||||
storepass = 'BadStorePassword'
|
||||
keypass = 'BadKeyPassword'
|
||||
lazy = true // only sign when unsigned
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
test {
|
||||
griffon {
|
||||
jars {
|
||||
sign = false
|
||||
pack = false
|
||||
}
|
||||
}
|
||||
}
|
||||
production {
|
||||
signingkey {
|
||||
params {
|
||||
sigfile = 'GRIFFON'
|
||||
keystore = 'keystore.jks'
|
||||
alias = 'timestamper'
|
||||
// NOTE: for production keys it is more secure to rely on key prompting
|
||||
// no value means we will prompt //storepass = 'BadStorePassword'
|
||||
// no value means we will prompt //keypass = 'BadKeyPassword'
|
||||
lazy = false // sign, regardless of existing signatures
|
||||
}
|
||||
}
|
||||
|
||||
griffon {
|
||||
jars {
|
||||
sign = true
|
||||
pack = true
|
||||
destDir = "${basedir}/staging"
|
||||
}
|
||||
webstart {
|
||||
codebase = 'CHANGE ME'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
griffon {
|
||||
memory {
|
||||
//max = '64m'
|
||||
//min = '2m'
|
||||
//maxPermSize = '64m'
|
||||
}
|
||||
jars {
|
||||
sign = false
|
||||
pack = false
|
||||
destDir = "${basedir}/staging"
|
||||
jarName = "${appName}.jar"
|
||||
}
|
||||
extensions {
|
||||
jarUrls = []
|
||||
jnlpUrls = []
|
||||
}
|
||||
webstart {
|
||||
codebase = "${new File(griffon.jars.destDir).toURI().toASCIIString()}"
|
||||
jnlp = 'application.jnlp'
|
||||
}
|
||||
applet {
|
||||
jnlp = 'applet.jnlp'
|
||||
html = 'applet.html'
|
||||
}
|
||||
}
|
||||
|
BIN
griffon-app/conf/keys/productionKeystore
Normal file
6
griffon-app/conf/webstart/applet.html
Executable file → Normal file
@ -8,7 +8,7 @@
|
||||
|
||||
<script src="http://java.com/js/deployJava.js"></script>
|
||||
<script>
|
||||
var attributes = {id: '@griffonAppName@',
|
||||
var attributes = {id: 'TimeStamper',
|
||||
codebase:'@griffonAppCodebase@',
|
||||
code:'@griffonAppletClass@',
|
||||
archive:'@appletJars@',
|
||||
@ -18,7 +18,7 @@
|
||||
jnlp_href:'@griffonAppCodebase@/applet.jnlp',
|
||||
draggable:'true',
|
||||
image:'griffon.png',
|
||||
boxmessage:'Loading @griffonAppName@',
|
||||
boxmessage:'Loading TimeStamper',
|
||||
boxbgcolor:'#FFFFFF', boxfgcolor:'#000000',
|
||||
codebase_lookup: 'false'} ;
|
||||
var version = '1.5.0' ;
|
||||
@ -33,7 +33,7 @@
|
||||
<PARAM NAME='jnlp_href' VALUE='@griffonAppCodebase@/applet.jnlp'>
|
||||
<PARAM NAME='dragggable' VALUE='true'>
|
||||
<PARAM NAME='image' VALUE='griffon.png'>
|
||||
<PARAM NAME='boxmessage' VALUE='Loading @griffonAppName@'>
|
||||
<PARAM NAME='boxmessage' VALUE='Loading TimeStamper'>
|
||||
<PARAM NAME='boxbgcolor' VALUE='#FFFFFF'>
|
||||
<PARAM NAME='boxfgcolor' VALUE='#000000'>
|
||||
<PARAM NAME='codebase_lookup' VALUE='false'>
|
||||
|
18
griffon-app/conf/webstart/applet.jnlp
Executable file → Normal file
@ -1,19 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE jnlp SYSTEM "http://java.sun.com/dtd/JNLP-1.5.dtd">
|
||||
<jnlp
|
||||
version="@griffonAppVersion@"
|
||||
version="2.1"
|
||||
codebase="@griffonAppCodebase@"
|
||||
href="@jnlpFileName@"
|
||||
>
|
||||
<information>
|
||||
<title>@griffonAppName@</title>
|
||||
<vendor>@griffonAppName@</vendor>
|
||||
<title>TimeStamper</title>
|
||||
<vendor>TimeStamper</vendor>
|
||||
<!--<homepage href="http://app.example.com/"/>-->
|
||||
<!--fallback description-->
|
||||
<description>@griffonAppName@</description>
|
||||
<description kind="one-line">@griffonAppName@</description>
|
||||
<description kind="short">@griffonAppName@</description>
|
||||
<description kind="tooltip">@griffonAppName@</description>
|
||||
<description>TimeStamper</description>
|
||||
<description kind="one-line">TimeStamper</description>
|
||||
<description kind="short">TimeStamper</description>
|
||||
<description kind="tooltip">TimeStamper</description>
|
||||
<!-- fallback icon -->
|
||||
<icon href="griffon-icon-48x48.png" kind="default" width="48" height="48"/>
|
||||
<!-- icon used for splash screen -->
|
||||
@ -25,7 +25,7 @@
|
||||
<!-- to create shortcuts, uncomment this
|
||||
<shortcut online="true">
|
||||
<desktop/>
|
||||
<menu submenu="@griffonAppName@"/>
|
||||
<menu submenu="TimeStamper"/>
|
||||
</shortcut>
|
||||
-->
|
||||
<offline-allowed/>
|
||||
@ -44,7 +44,7 @@
|
||||
</resources>
|
||||
<applet-desc
|
||||
documentbase="@griffonAppCodebase@"
|
||||
name="@griffonAppName@Applet"
|
||||
name="TimeStamperApplet"
|
||||
main-class="@griffonAppletClass@"
|
||||
width="320"
|
||||
height="640">
|
||||
|
16
griffon-app/conf/webstart/application.jnlp
Executable file → Normal file
@ -1,19 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE jnlp SYSTEM "http://java.sun.com/dtd/JNLP-1.5.dtd">
|
||||
<jnlp
|
||||
version="@griffonAppVersion@"
|
||||
version="2.1"
|
||||
codebase="@griffonAppCodebase@"
|
||||
href="@jnlpFileName@"
|
||||
>
|
||||
<information>
|
||||
<title>@griffonAppName@</title>
|
||||
<vendor>@griffonAppName@</vendor>
|
||||
<title>TimeStamper</title>
|
||||
<vendor>TimeStamper</vendor>
|
||||
<!--<homepage href="http://app.example.com/"/>-->
|
||||
<!--fallback description-->
|
||||
<description>@griffonAppName@</description>
|
||||
<description kind="one-line">@griffonAppName@</description>
|
||||
<description kind="short">@griffonAppName@</description>
|
||||
<description kind="tooltip">@griffonAppName@</description>
|
||||
<description>TimeStamper</description>
|
||||
<description kind="one-line">TimeStamper</description>
|
||||
<description kind="short">TimeStamper</description>
|
||||
<description kind="tooltip">TimeStamper</description>
|
||||
<!-- fallback icon -->
|
||||
<icon href="griffon-icon-48x48.png" kind="default" width="48" height="48"/>
|
||||
<!-- icon used for splash screen -->
|
||||
@ -25,7 +25,7 @@
|
||||
<!-- to create shortcuts, uncomment this
|
||||
<shortcut online="true">
|
||||
<desktop/>
|
||||
<menu submenu="@griffonAppName@"/>
|
||||
<menu submenu="TimeStamper"/>
|
||||
</shortcut>
|
||||
<offline-allowed/>
|
||||
-->
|
||||
|
0
griffon-app/i18n/resources.properties
Normal file
@ -18,7 +18,5 @@
|
||||
*/
|
||||
|
||||
import groovy.swing.SwingBuilder
|
||||
import griffon.util.GriffonPlatformHelper
|
||||
|
||||
GriffonPlatformHelper.tweakForNativePlatform(app)
|
||||
SwingBuilder.lookAndFeel('system', 'nimbus', ['metal', [boldFonts: false]])
|
||||
|
BIN
griffon-app/resources/griffon-icon-128x128.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
griffon-app/resources/griffon-icon-16x16.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
griffon-app/resources/griffon-icon-24x24.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
griffon-app/resources/griffon-icon-256x256.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
griffon-app/resources/griffon-icon-32x32.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
griffon-app/resources/griffon-icon-48x48.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
griffon-app/resources/griffon-icon-64x64.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
griffon-app/resources/griffon.png
Normal file
After Width: | Height: | Size: 15 KiB |
@ -16,8 +16,8 @@ mousePressed = { evt -> mousePressRelativeToDialog = evt?.point }
|
||||
|
||||
mouseDragged = { evt ->
|
||||
GUIUtil.componentDragged(dialog, evt, mousePressRelativeToDialog,
|
||||
new Rectangle(Toolkit.defaultToolkit.screenSize),
|
||||
model.mainMVC.view.frame.bounds)
|
||||
new Rectangle(Toolkit.defaultToolkit.screenSize),
|
||||
model.mainMVC.view.frame.bounds)
|
||||
|
||||
offsetFromMainFrame = GUIUtil.calculateOffset(
|
||||
model.mainMVC.view.frame, dialog)
|
||||
|
@ -4,6 +4,7 @@ import java.awt.Color
|
||||
import java.awt.Point
|
||||
import java.awt.Toolkit
|
||||
import java.awt.Rectangle
|
||||
import java.beans.PropertyChangeListener
|
||||
import java.text.SimpleDateFormat
|
||||
import javax.swing.JDialog
|
||||
import java.util.Calendar
|
||||
@ -22,8 +23,8 @@ mousePressed = { evt -> mousePressRelativeToDialog = evt?.point }
|
||||
|
||||
mouseDragged = { evt ->
|
||||
GUIUtil.componentDragged(dialog, evt, mousePressRelativeToDialog,
|
||||
new Rectangle(Toolkit.defaultToolkit.screenSize),
|
||||
model.mainMVC.view.frame.bounds)
|
||||
new Rectangle(Toolkit.defaultToolkit.screenSize),
|
||||
model.mainMVC.view.frame.bounds)
|
||||
|
||||
offsetFromMainFrame = GUIUtil.calculateOffset(
|
||||
model.mainMVC.view.frame, dialog)
|
||||
@ -59,9 +60,10 @@ dialog = dialog(new JDialog(model.mainMVC.view.frame),
|
||||
dayDisplay = widget(constraints: 'grow, gp 200',
|
||||
new TimelineDayDisplay(model.mainMVC.model.timeline),
|
||||
timeline: bind(source: model.mainMVC.model,
|
||||
sourceProperty: 'timeline'),
|
||||
stateChanged: bind(source: model.mainMVC.model,
|
||||
sourceProperty: 'currentMarker'))
|
||||
sourceProperty: 'timeline'))
|
||||
|
||||
model.mainMVC.model.addPropertyChangeListener('currentMarker', {
|
||||
dayDisplay.stateChanged(null) } as PropertyChangeListener)
|
||||
|
||||
panel(
|
||||
border: lineBorder(color: Color.BLACK, thickness: 1),
|
||||
|
@ -187,7 +187,7 @@ aboutDialog = dialog(new JDialog(frame),
|
||||
locationRelativeTo: null,
|
||||
pack: true,
|
||||
undecorated: true,
|
||||
title: "About TimeStamper v" + app.applicationProperties.'app.version'
|
||||
title: "About TimeStamper v" + app.metadata.'app.version'
|
||||
) {
|
||||
panel(layout: new MigLayout('fill'),
|
||||
border: lineBorder(color: Color.BLACK, thickness: 1)) {
|
||||
@ -195,7 +195,7 @@ aboutDialog = dialog(new JDialog(frame),
|
||||
label(font: new Font(Font.SANS_SERIF, Font.PLAIN, 18),
|
||||
text: "TimeStamper", constraints: 'growx, wrap',
|
||||
horizontalAlignment: SwingConstants.CENTER)
|
||||
label(text: "version " + app.applicationProperties.'app.version'
|
||||
label(text: "version " + app.metadata.'app.version'
|
||||
+ " by Jonathan Bernard", constraints: 'growx, wrap',
|
||||
horizontalAlignment: SwingConstants.CENTER)
|
||||
textField(text: 'http://www.jdb-labs.com/timestamper',
|
||||
|