Thursday, November 26, 2009

Griffon Painter Demo

I was looking at the Swing Labs site and ran across the page on painters( 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),

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

iconImage: imageIcon('/griffon-icon-48x48.png').image,
iconImages: [imageIcon('/griffon-icon-48x48.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.