Reorganizing into subprojects.
libpit - Personal Issue Tracker core libraries (Filter, Issue, Project, Category) pit-cli - Command Line Interface (CLI) to libpit pit-swing - Graphical, Swing interface to libpit (built using Griffon) libpit and pit-swing both build, though pit-swing is just an empty griffon poject.
19
pit-swing/griffon-app/conf/Application.groovy
Normal file
@ -0,0 +1,19 @@
|
||||
application {
|
||||
title='PitSwing'
|
||||
startupGroups = ['pit-swing']
|
||||
|
||||
// Should Griffon exit when no Griffon created frames are showing?
|
||||
autoShutdown = true
|
||||
|
||||
// If you want some non-standard application class, apply it here
|
||||
//frameClass = 'javax.swing.JFrame'
|
||||
}
|
||||
mvcGroups {
|
||||
// MVC Group for "pit-swing"
|
||||
'pit-swing' {
|
||||
model = 'PitSwingModel'
|
||||
controller = 'PitSwingController'
|
||||
view = 'PitSwingView'
|
||||
}
|
||||
|
||||
}
|
9
pit-swing/griffon-app/conf/Builder.groovy
Normal file
@ -0,0 +1,9 @@
|
||||
root {
|
||||
'groovy.swing.SwingBuilder' {
|
||||
controller = ['Threading']
|
||||
view = '*'
|
||||
}
|
||||
'griffon.app.ApplicationBuilder' {
|
||||
view = '*'
|
||||
}
|
||||
}
|
94
pit-swing/griffon-app/conf/Config.groovy
Normal file
@ -0,0 +1,94 @@
|
||||
// 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
|
||||
}
|
||||
}
|
||||
additivity.StackTrace=false
|
||||
}
|
||||
|
||||
// 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 = 'CHANGE ME'
|
||||
alias = 'CHANGE ME'
|
||||
// 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'
|
||||
}
|
||||
}
|
43
pit-swing/griffon-app/conf/webstart/applet.html
Normal file
@ -0,0 +1,43 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script src="http://java.com/js/deployJava.js"></script>
|
||||
<script>
|
||||
var attributes = {id: '@griffonAppName@',
|
||||
codebase:'@griffonAppCodebase@',
|
||||
code:'@griffonAppletClass@',
|
||||
archive:'@appletJars@',
|
||||
width:'240', height:'320'} ;
|
||||
var parameters = {fontSize:16,
|
||||
java_arguments: "-Djnlp.packEnabled=true",
|
||||
jnlp_href:'@griffonAppCodebase@/applet.jnlp',
|
||||
draggable:'true',
|
||||
image:'griffon.png',
|
||||
boxmessage:'Loading @griffonAppName@',
|
||||
boxbgcolor:'#FFFFFF', boxfgcolor:'#000000',
|
||||
codebase_lookup: 'false'} ;
|
||||
var version = '1.5.0' ;
|
||||
deployJava.runApplet(attributes, parameters, version);
|
||||
</script>
|
||||
<!--
|
||||
<APPLET CODEBASE='@griffonAppCodebase@'
|
||||
CODE='@griffonAppletClass@'
|
||||
ARCHIVE='@appletJars@'
|
||||
WIDTH='240' HEIGHT='320'>
|
||||
<PARAM NAME="java_arguments" VALUE="-Djnlp.packEnabled=true">
|
||||
<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='boxbgcolor' VALUE='#FFFFFF'>
|
||||
<PARAM NAME='boxfgcolor' VALUE='#000000'>
|
||||
<PARAM NAME='codebase_lookup' VALUE='false'>
|
||||
</APPLET>
|
||||
-->
|
||||
</body>
|
||||
</html>
|
55
pit-swing/griffon-app/conf/webstart/applet.jnlp
Normal file
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE jnlp SYSTEM "http://java.sun.com/dtd/JNLP-1.5.dtd">
|
||||
<jnlp
|
||||
version="@griffonAppVersion@"
|
||||
codebase="@griffonAppCodebase@"
|
||||
href="@jnlpFileName@"
|
||||
>
|
||||
<information>
|
||||
<title>@griffonAppName@</title>
|
||||
<vendor>@griffonAppName@</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>
|
||||
<!-- fallback icon -->
|
||||
<icon href="griffon-icon-48x48.png" kind="default" width="48" height="48"/>
|
||||
<!-- icon used for splash screen -->
|
||||
<icon href="griffon.png" kind="splash" width="381" height="123"/>
|
||||
<!-- icon used in menu -->
|
||||
<icon href="griffon-icon-16x16.png" kind="shortcut" width="16" height="16"/>
|
||||
<!-- icon used on desktop -->
|
||||
<icon href="griffon-icon-32x32.png" kind="shortcut" width="32" height="32"/>
|
||||
<!-- to create shortcuts, uncomment this
|
||||
<shortcut online="true">
|
||||
<desktop/>
|
||||
<menu submenu="@griffonAppName@"/>
|
||||
</shortcut>
|
||||
-->
|
||||
<offline-allowed/>
|
||||
</information>
|
||||
<security>
|
||||
<all-permissions/>
|
||||
<!--<j2ee-application-client-permissions/>-->
|
||||
</security>
|
||||
<resources>
|
||||
<property name="jnlp.packEnabled" value="true"/>
|
||||
<j2se version="1.5+" @memoryOptions@/>
|
||||
<!-- auto-added jars follow, griffon-rt, app, and groovy -->
|
||||
@jnlpJars@
|
||||
<!-- Add all extra jars below here, or the app may break -->
|
||||
@jnlpExtensions@
|
||||
</resources>
|
||||
<applet-desc
|
||||
documentbase="@griffonAppCodebase@"
|
||||
name="@griffonAppName@Applet"
|
||||
main-class="@griffonAppletClass@"
|
||||
width="320"
|
||||
height="640">
|
||||
<!-- params are ignored when referenced from web page for 6u10 -->
|
||||
<!--<param name="key1" value="value1"/>-->
|
||||
<!--<param name="key2" value="value2"/>-->
|
||||
</applet-desc>
|
||||
</jnlp>
|
50
pit-swing/griffon-app/conf/webstart/application.jnlp
Normal file
@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE jnlp SYSTEM "http://java.sun.com/dtd/JNLP-1.5.dtd">
|
||||
<jnlp
|
||||
version="@griffonAppVersion@"
|
||||
codebase="@griffonAppCodebase@"
|
||||
href="@jnlpFileName@"
|
||||
>
|
||||
<information>
|
||||
<title>@griffonAppName@</title>
|
||||
<vendor>@griffonAppName@</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>
|
||||
<!-- fallback icon -->
|
||||
<icon href="griffon-icon-48x48.png" kind="default" width="48" height="48"/>
|
||||
<!-- icon used for splash screen -->
|
||||
<icon href="griffon.png" kind="splash" width="381" height="123"/>
|
||||
<!-- icon used in menu -->
|
||||
<icon href="griffon-icon-16x16.png" kind="shortcut" width="16" height="16"/>
|
||||
<!-- icon used on desktop -->
|
||||
<icon href="griffon-icon-32x32.png" kind="shortcut" width="32" height="32"/>
|
||||
<!-- to create shortcuts, uncomment this
|
||||
<shortcut online="true">
|
||||
<desktop/>
|
||||
<menu submenu="@griffonAppName@"/>
|
||||
</shortcut>
|
||||
<offline-allowed/>
|
||||
-->
|
||||
</information>
|
||||
<security>
|
||||
<all-permissions/>
|
||||
<!--<j2ee-application-client-permissions/>-->
|
||||
</security>
|
||||
<resources>
|
||||
<property name="jnlp.packEnabled" value="true"/>
|
||||
<j2se version="1.5+" @memoryOptions@/>
|
||||
<!-- auto-added jars follow, griffon-rt, app, and groovy -->
|
||||
@jnlpJars@
|
||||
<!-- Add all extra jars below here, or the app may break -->
|
||||
@jnlpExtensions@
|
||||
</resources>
|
||||
<application-desc main-class="@griffonApplicationClass@">
|
||||
<!-- params are ignored when referenced from web page for 6u10 -->
|
||||
<!--<param name="key1" value="value1"/>-->
|
||||
<!--<param name="key2" value="value2"/>-->
|
||||
</application-desc>
|
||||
</jnlp>
|
BIN
pit-swing/griffon-app/conf/webstart/griffon-icon-128x128.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
pit-swing/griffon-app/conf/webstart/griffon-icon-16x16.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
pit-swing/griffon-app/conf/webstart/griffon-icon-24x24.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
pit-swing/griffon-app/conf/webstart/griffon-icon-256x256.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
pit-swing/griffon-app/conf/webstart/griffon-icon-32x32.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
pit-swing/griffon-app/conf/webstart/griffon-icon-48x48.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
pit-swing/griffon-app/conf/webstart/griffon-icon-64x64.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
pit-swing/griffon-app/conf/webstart/griffon.png
Normal file
After Width: | Height: | Size: 15 KiB |
14
pit-swing/griffon-app/controllers/PitSwingController.groovy
Normal file
@ -0,0 +1,14 @@
|
||||
class PitSwingController {
|
||||
// these will be injected by Griffon
|
||||
def model
|
||||
def view
|
||||
|
||||
void mvcGroupInit(Map args) {
|
||||
// this method is called after model and view are injected
|
||||
}
|
||||
|
||||
/*
|
||||
def action = { evt = null ->
|
||||
}
|
||||
*/
|
||||
}
|
0
pit-swing/griffon-app/i18n/messages.properties
Normal file
24
pit-swing/griffon-app/lifecycle/Initialize.groovy
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* This script is executed inside the EDT, so be sure to
|
||||
* call long running code in another thread.
|
||||
*
|
||||
* You have the following options
|
||||
* - SwingBuilder.doOutside { // your code }
|
||||
* - Thread.start { // your code }
|
||||
* - SwingXBuilder.withWorker( start: true ) {
|
||||
* onInit { // initialization (optional, runs in current thread) }
|
||||
* work { // your code }
|
||||
* onDone { // finish (runs inside EDT) }
|
||||
* }
|
||||
*
|
||||
* You have the following options to run code again inside EDT
|
||||
* - SwingBuilder.doLater { // your code }
|
||||
* - SwingBuilder.edt { // your code }
|
||||
* - SwingUtilities.invokeLater { // your code }
|
||||
*/
|
||||
|
||||
import groovy.swing.SwingBuilder
|
||||
import griffon.util.GriffonPlatformHelper
|
||||
|
||||
GriffonPlatformHelper.tweakForNativePlatform(app)
|
||||
SwingBuilder.lookAndFeel('mac', 'nimbus', 'gtk', ['metal', [boldFonts: false]])
|
18
pit-swing/griffon-app/lifecycle/Ready.groovy
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* This script is executed inside the EDT, so be sure to
|
||||
* call long running code in another thread.
|
||||
*
|
||||
* You have the following options
|
||||
* - SwingBuilder.doOutside { // your code }
|
||||
* - Thread.start { // your code }
|
||||
* - SwingXBuilder.withWorker( start: true ) {
|
||||
* onInit { // initialization (optional, runs in current thread) }
|
||||
* work { // your code }
|
||||
* onDone { // finish (runs inside EDT) }
|
||||
* }
|
||||
*
|
||||
* You have the following options to run code again inside EDT
|
||||
* - SwingBuilder.doLater { // your code }
|
||||
* - SwingBuilder.edt { // your code }
|
||||
* - SwingUtilities.invokeLater { // your code }
|
||||
*/
|
18
pit-swing/griffon-app/lifecycle/Shutdown.groovy
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* This script is executed inside the EDT, so be sure to
|
||||
* call long running code in another thread.
|
||||
*
|
||||
* You have the following options
|
||||
* - SwingBuilder.doOutside { // your code }
|
||||
* - Thread.start { // your code }
|
||||
* - SwingXBuilder.withWorker( start: true ) {
|
||||
* onInit { // initialization (optional, runs in current thread) }
|
||||
* work { // your code }
|
||||
* onDone { // finish (runs inside EDT) }
|
||||
* }
|
||||
*
|
||||
* You have the following options to run code again inside EDT
|
||||
* - SwingBuilder.doLater { // your code }
|
||||
* - SwingBuilder.edt { // your code }
|
||||
* - SwingUtilities.invokeLater { // your code }
|
||||
*/
|
18
pit-swing/griffon-app/lifecycle/Startup.groovy
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* This script is executed inside the EDT, so be sure to
|
||||
* call long running code in another thread.
|
||||
*
|
||||
* You have the following options
|
||||
* - SwingBuilder.doOutside { // your code }
|
||||
* - Thread.start { // your code }
|
||||
* - SwingXBuilder.withWorker( start: true ) {
|
||||
* onInit { // initialization (optional, runs in current thread) }
|
||||
* work { // your code }
|
||||
* onDone { // finish (runs inside EDT) }
|
||||
* }
|
||||
*
|
||||
* You have the following options to run code again inside EDT
|
||||
* - SwingBuilder.doLater { // your code }
|
||||
* - SwingBuilder.edt { // your code }
|
||||
* - SwingUtilities.invokeLater { // your code }
|
||||
*/
|
0
pit-swing/griffon-app/lifecycle/Stop.groovy
Normal file
5
pit-swing/griffon-app/models/PitSwingModel.groovy
Normal file
@ -0,0 +1,5 @@
|
||||
import groovy.beans.Bindable
|
||||
|
||||
class PitSwingModel {
|
||||
// @Bindable String propName
|
||||
}
|
BIN
pit-swing/griffon-app/resources/griffon-icon-128x128.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
pit-swing/griffon-app/resources/griffon-icon-16x16.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
pit-swing/griffon-app/resources/griffon-icon-24x24.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
pit-swing/griffon-app/resources/griffon-icon-256x256.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
pit-swing/griffon-app/resources/griffon-icon-32x32.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
pit-swing/griffon-app/resources/griffon-icon-48x48.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
pit-swing/griffon-app/resources/griffon-icon-64x64.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
pit-swing/griffon-app/resources/griffon.png
Normal file
After Width: | Height: | Size: 15 KiB |
13
pit-swing/griffon-app/views/PitSwingView.groovy
Normal file
@ -0,0 +1,13 @@
|
||||
application(title:'pit-swing',
|
||||
//size:[320,480],
|
||||
pack:true,
|
||||
//location:[50,50],
|
||||
locationByPlatform:true,
|
||||
iconImage: imageIcon('/griffon-icon-48x48.png').image,
|
||||
iconImages: [imageIcon('/griffon-icon-48x48.png').image,
|
||||
imageIcon('/griffon-icon-32x32.png').image,
|
||||
imageIcon('/griffon-icon-16x16.png').image]
|
||||
) {
|
||||
// add content here
|
||||
label('Content Goes Here') // deleteme
|
||||
}
|