Thursday, November 26, 2009

Griffon Painter Demo


I was looking at the Swing Labs site and ran across the page on painters(http://swinglabs.org/docs/frameworks/painters/index.jsp) and thought the code looked pretty straight forward. Then I had the thought, Well Griffon uses SwingX I wonder, . . . the result is the image above.

Griffon code: PainterView.groovy


import java.awt.*
import org.jdesktop.swingx.painter.*

GlossPainter gloss = new GlossPainter(new Color(1.0f, 1.0f, 1.0f, 0.2f),
GlossPainter.GlossPosition.TOP)

PinstripePainter stripes = new PinstripePainter(
paint: new Color(1.0f, 1.0f, 1.0f, 0.17f),
spacing:5.0
)
MattePainter matte = new MattePainter(new Color(51, 51, 51));

application(title:'painter',
//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]
) {
jxpanel(id: "header",
backgroundPainter: new CompoundPainter(matte, stripes, gloss)) {
label('Griffon Painter Demo',
icon: imageIcon(resource:'griffon-icon-48x48.png'),
foreground: Color.white)
}
}

Tuesday, November 10, 2009

COJUG: Eclipse Demo Camp Links

Here are the Links for my COJUG: Eclipse Demo Camp Groovy and Grails Plugins discussion

You can use these links to download the Eclipse Groovy V2 plugin and SpringSource Tool Suite.

http://groovy.codehaus.org/Eclipse+Plugin+V2+FAQ#EclipsePluginV2FAQ
http://blog.springsource.com/2009/07/30/a-groovier-eclipse-experience/
http://docs.codehaus.org/pages/viewpage.action?pageId=133464433
http://grails.org/STS+Integration
http://www.springsource.com/products/springsource-tool-suite-download

Thursday, September 10, 2009

The Griffon Celebrates



WooHooo! Griffon celebrates the first anniversary of its public release today. Griffon was first released Sept. 10, 2008. It is hard to believe it has only been a year.

It has been a very productive first year. Griffon is maturing and the word is getting out. For me, the most notable event was Guillaume Laforge winning the Java One 2009 Scriptbowl with an application called Twittersphere. Twittersphere was build using Griffon and Groovy.

The founding fathers of Griffon (Danno Ferrin, Andres Almiray, James Williams) have done an absolutely fabulous job. Their work and dedication have enabled it to become what it is today.

Well Done guys!

PS Keep your ears open, . . . you might hear some Griffon news soon.

Saturday, September 5, 2009

ANN: gConfig 0.1.2




I am pleased to announce the release of gConfig 0.1.2, a configuration tool for Griffon, a Groovy Technology.

This release is an upgrade to Griffon 0.1.2 and resolves a LogManager not found issue.

Background

While building Griffon applications, I found myself doing the same repeatative steps when I started building the application. Install these sets of plugins, get those additional 3rd party jars, and oh ya, I want a menubar, toolbar, statusbar, . . . , you get the drift.

I felt like I was spending too much time doing boilerplate code. So I did what any good IT person would do, made it easier through automation. The result is gConfig.

After creating the application, you run gConfig. gConfig is a wizard that will present you with a list of the currently available plugins. You pick which ones you one and the move on to select some popular predefined 3rd party jars. Finally, you are presented with a collection of templates (Menubar, ToolBar, StatusBar, About, and Tips) to install.

When you have completed your selections, gConfig will do the rest. Install the plugins, download the jars, and install the selected templates.

It saves a load of time.

Give it a try.

Screen Shots:









Monday, August 3, 2009

ANN: Grails RefCode Plugin 0.2

Marcel Overdijk released RefCode plugin May 2008. The plugin provides an easy solution for 'code/description' reference/lookup data. Often in your business model you have simple reference/lookup tables with just code and description columns; e.g. Country (uk=United Kingdom, nl=Netherlands, ...), OrderStatus (C=Cancelled, N=New, P=Pending, S=Shipped), OrganizationType, ...

The latest release of the plugin include the refCode Custom Constraint to make validation against the domain valued even easier.

Assuming you a have a domain of "USStates", you can now setup a constraint like so:


class Person {
String name
String street
String city
String state
String zip

static constraints = {
name()
street()
city()
state(refCode:"USStates")
zip()
}
}


You can find out more about the RefCode Plugin at: http://www.grails.org/Ref+Code+Plugin

Tuesday, June 2, 2009

ANN: AbeilleForm-Builder 0.1 - Griffon Plugin

I am pleased to announce the first release of AbeilleForm Builder. The AbeilleForm Builder makes it possible to easily use Abeille Forms in your Groovy swingbuilder and Griffon applications

Abeille Forms Designer is a GUI builder for Java applications. Developers and designers can create complex, professional forms in minutes. Designers can drag and drop components onto a WYSIWYG editor. Full support for undo/redo and copy/paste is provided. Components can be easily customized by adding images or modifying their properties. Advanced fill effects are supported such as textures and gradients.

With the AbeilleForm Builder, you can use the .jfrm file in your application and access the form components.

Installation


The builder is installed as follows:


griffon install-plugin abeilleform-builder


Usage




application(title:'taf',
//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]
) {
build(Actions)
formPanel(id: "cf", "countForm.jfrm")
countButton.action = clickAction
bind(source: model ,sourceProperty: "count", target: countLabel, targetProperty: "text" )
}


Notice the node "formPanel". The "formPanel" node loads the ".jfrm" form created in the AbeilleForm Designer into your griffon application. During the process of loading the form, the builder creates a bean reference for the form components. This allows us to address the form component by name. E.g "countButton" and "countLabel"

You can learn more about AbeilleForms at http://abeille.dev.java.net

Tuesday, May 26, 2009

ANN gConfig 0.1 - a Configuration tool for Griffon




I am pleased to announce the first public release of gConfig 0.1, a configuration tool for Griffon, a Groovy Technology.

While building Griffon applications, I found myself doing the same repeatative steps when I started building the application. Install these sets of plugins, get those additional 3rd party jars, and oh ya, I want a menubar, toolbar, statusbar, . . . , you get the drift.

I felt like I was spending too much time doing boilerplate code. So I did what any good IT person would do, made it easier through automation. The result is gConfig.

After creating the application, you run gConfig. gConfig is a wizard that will present you with a list of the currently available plugins. You pick which ones you one and the move on to select some popular predefined 3rd party jars. Finally, you are presented with a collection of templates (Menubar, ToolBar, StatusBar, About, and Tips) to install.

When you have completed your selections, gConfig will do the rest. Install the plugins, download the jars, and install the selected templates.

It saves a load of time.

Give it a try.

Screen Shots:









Saturday, May 23, 2009

Gr8Cong - Griffon Code @GitHub

The Code for the Griffon Desktop Front-end application to Graeme's Twitter Clone is available at GitHub

Really Good Blog post covering Gr8Conf

Really Good Blog post covering Gr8Conf: http://gettinggroovy.wordpress.com/category/gr8/

Gr8 Conf - Outstanding Success



Well the Gr8Conf was an outstanding success. The organizers Soeren Glasius and Guillaume Laforge put on Gr8 Conference, it will be hard to top.

Guillaume Laforge, Graeme Rocher, Paul King, Dierk Koenig, Jochen Theodorou, and many other Groovy technology giants were there. It was an honor to be in the presence of all that Groovy brain power, . . .

The attendees were pretty sharp too, . . . there were some gr8 questions and ideas shared. I've already started following on the Griffon ideas.

And Copenhagen, . . . What a wonderful place. Everyone was very kind and helpful. And the sights, . . . Many wonderful things to see and do.

I would like to give a special Thank you to Soeren for being such a Gr8 Host. He really took Gr8 care of everyone and made everyone feel at home. I would especially like to thank him for helping me and my family have fun and seeing the sights of Copenhagen and Denmark.

Tuesday, April 28, 2009

ANN: Griffon Splash Plugin Updated



I am pleased to announce the release of the Griffon plugin, Splash 0.1.1. Splash has been updated to use the new Griffon Banner and enhanced as per GRIFFON-38.

Sunday, January 18, 2009

ANN: Griffon Splash Screen Plugin

I am pleased to announce the release of my first Griffon plugin, Splash. Splash is a Griffon splash screen plugin based upon Roy Ratcliff's Java Splash Screen paper http://www.randelshofer.ch/oop/javasplash/Java%20Splash%20Screen.pdf

Installation



griffon install-plugin splash


The "initialize.groovy" script causes the splash screen to be displayed. The splash screen is disposed of by the "ready.groovy" script. Griffon executes teh initialize script then creates and initialize the controller, model, and view. Durring the initialization process, the splash screen status can be updated using the following technique.


SplashScreen.getInstance().showStatus("Initializing the Controller")


The plugin also provides the ability to provide your own image. this is accomplished in the
initialize.groovy
script using the following technique.


def splashScreen = SplashScreen.getInstance()

// Setting a splash image
URL url = this.class.getResource("mySplash.jpg")
splashScreen.setImage(url)


Keep an eye on: http://griffon.codehaus.org/Splash+Plugin

A special thanks to Andres Almiray for helping me and all of the Griffon Team.

Saturday, January 17, 2009

Testing new SyntaxHighlighting Plugin

This is a simple post to test syntax highlighting


public void printHello(){
System.out.println("Hello World");
}


Let's try some Groovy code now


class MyController {
// 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 ->
}
*/
}


I hope it works

Got it working, . . .

Keys to getting it working:
http://fahdshariff.blogspot.com/2008/07/syntax-highlighting-code-in-webpages.html
http://code.google.com/p/syntaxhighlighter/wiki/BloggerMode

Borrowed Groovy Highlighting from: http://grails.org/SyntaxHighlighter+Plugin

Sunday, January 11, 2009

CodeMash 2009 - Griffon in Front Grails in Back

I uploaded the slides from my Griffon in Front Grails in Back session at CodeMash 2009.

For Those of you who attend the talk, I enhanced the counting application based upon your questions. The code in the counting example now includes @bindable.


Slides: http://www.slideshare.net/jshingler/griffon-in-front-grails-in-back-presentation
gCollabTodo Code: http://github.com/jshingler/gcollabtodo/tree/master

Friday, January 9, 2009

CodeMash 2009 - Groovy and Grails Precompile

Just uploaded the Slides and Code from the Precompile Presentation that Chris Judd and I did at CodeMash 2009 on Groovy and Grails.

The presentation went really well.

Slides: http://www.slideshare.net/jshingler/gg-code-mash2009-20090106-presentation/
Code: http://github.com/jshingler/codemash2009precompile/tree/master