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)
}
}

5 comments:

Anonymous said...

Great story as for me. It would be great to read more about this matter. Thanks for posting that data.
The only thing your blog miss is such photo or even two :)
Sexy Lady
Busty Escort London

Anonymous said...

I inclination not approve on it. I assume warm-hearted post. Particularly the appellation attracted me to be familiar with the intact story.

Anonymous said...

Brim over I to but I think the brief should acquire more info then it has.

escort girls in Ukraine said...

Intresting opinion you place here.
It will be useful to read anything more concerning this article.
Thnx for giving that information.
With best regards Margo!!

Oberon said...

wood desks
brunch philadelphia
wood dining table
hotel furniture outlet
bedroom mirror
waterproofing basement
japanese bed
light fixtures
crawl space insulation
medical schools in new york