Archives for June 2007

SwingXBuilder Demo Calendar widget

As promised, here is one of the demos for BarCamp that I ported to Groovy with the SwingXBuilder. The original demo was a desklet using the Glossitope architecture but I decided to strip that stuff away since it never loaded correctly in Glossitope. It would run in Netbeans, but there was some sort of loading error. I guess when the SwingXBuilder reaches 1.0, I’ll talk to Josh Marinacci about that.

BarCamp Calendar Demo
Glossitope’s Calendar

Source code here – Gant is required

BarCamp Chicago Day 1

Yesterday(Sat) I woke up at 4A and drove to the airport to get my flight via Nashville to Chicago. Luckily the security checkpoints weren’t that bad and I was able to camp out a spot in line B[Southwest cattle call fun]. On the second flight, the pilot informed us that it was raining in Chicago. I wanted cooler not cold. It turned out to be brisk but not cold so I decided to keep on the shorts I was wearing. Worried about being the first arrival, I try to waste a little time before going to the venue. My plan worked out a little too well because I inadvertently got on the correct L-train line in the wrong direction. Thirteen stops later, I realized my mistake. I finally arrive at the general whereabouts at about 12:45 - 1P. Mind you, my flight landed at 9:40A! I thought the address was 1455 N Milwaukee. I walk up and down the street four or five times and see nothing. I see a sign for a public library and go in. I try to use the restroom, they have to buzz me in. WTF! This is a public library in a posh pseudo-SoHo area of Chicago. I try furiously to access their wifi network, the icon is spinning and spinning. I finally connect and realize the address is 1464, 3 blocks south of the library.

I arrive and am greeted by the organizer, Jason Rexilius, who points me toward all the pizza, chips, and snacks, all types of liquor, a cooler of Mountain Dew, a cooler of Red Bull, and a kiddie pool with 3 kegs, various bottled beers, and Gatorades. He may have mentioned something about the meeting space. About mid-day, he gave the keynote/welcome session noting that BarCamp Chicago is bigger than BarCamp New York[in terms of web traffic]. Throughout the day, there were some really cool demos. I got to see a OLPC XO-1 UP-CLOSE. I really want one. I would consider learning Python to get one. There was also a mini-talk on Nintendo DS Homebrew that I wasn’t able to get to because it coincided with a Ruby talk I wanted to check out.

There were technical difficulties all around. The guy who wanted to give an "Anatomy of Lisp" talk had a catastrophic pdf corruption. He’s gonna recover the file and give it today. There were several people who had projector issues, myself included. In my defense, there were 3 monitor cables in the presentation space. Ubuntu will do PnP if the component is plugged on bootup. I didn’t have as many people as I expected at my talk because it was so late in the day(8P). There were some good questions and I got the general feel that people liked it. They liked the demos... well, the ones that ran. Glossitope which uses Java Webstart to launch wouldn’t run. And this occured during a question about the differences between Webstart and Glossitope.(Argh!) About midway through the talk, I noticed my tick is saying the word "So..." at the end of slides. I pointed it out and got a couple of laughs when I would slip up and do it again. Some of my jokes flopped miserably, some went over well.

And then there was the dreaded question I knew would come: "Are there any visual GUI designers for Groovy?"
Alas, no.

Other than the free junk food, energy drinks, and alcohol, there were some great discussions. I felt free to express myself without having to dumb stuff down. These are really passionate people who read, know their industry, and didn’t learn just for a job. Jason Rexilius and I had a discussion about the merits and utility of Java. He thinks there is little to none but I still think he is a great guy. I talked to this kid Jess about the new JSRs and how the best ORM can’t make up for crappy DB design, and told a bunch of folks about my project.

One guy told me that at one point he counted 75 people so I’m guessing at least double that cycled in and out throughout the day.

Having been up for almost 24 hours, I turn in at 2A Chicago time. I curl up in a sleeping bag in a dim corner so my new friends can’t pull any frat boy tricks on the first to fall asleep. I wake up and shower to find that some of my compatriots have stayed up all night watching vids and drinking.

SwingX News

My webhost was having DB issues last week so that's why some of you might have gotten error pages. Anyways...

BarCamp is this week and I'm super excited to get out of Florida into slightly cooler weather. Last Saturday, it hit 90 degrees before 11AM. I think that's like 30 or 32 degrees for you Centigrade folks. I'm also looking forward to meeting fellow minded geeks.

So that this isn't a total fluff piece, and so that the aggregator picks it up, more Groovy SwingXBuilder demos are coming. I've been cramming to get stuff done so watch this space next week, I'll start putting stuff up. Due to BarCamp, the builder is basically in feature freeze until Monday save fixes, stuff from v1.0, and whatever I might need for a demo. Scott and Andres, thanks for the feedback.

Gratuitous use of ExpandoMetaClass

Things have been quietly and smoothly chugging along since the move to Groovy 1.1-BETA. I added support for a couple of the new SwingLabs Layout Managers. StackLayout, HorizontalLayout, and VerticalLayout being a couple of them. The latter two are great because they address the one sticking point I had with BoxLayout, the axis parameter. StackLayout, as its name implies, functions like CardLayout with one big difference. In CardLayout, each card obscures all the others. So I was wondering, what if you want to declare your components and have them added from front to back? Or vice versa? Could you do that with just one variable or function? Though you can set constraints, technically* you can't set one variable and change the direction. So I was thinking of using ExpandoMetaClass to add a direction property to the class. Is it unneeded? Kinda. Is it gratuitous complexity just to use a new feature? Probably.

Qu'en pensez-vous? [What do you think?]



*StackLayout defaults to Back to Front if you don't specify a constraint.

SwingXBuilder update my ears must have been burning

I guess my ears must’ve been burning and I didn’t notice it. Wednesday night, I decided to update the SwingX jars I was using because the ones I had were from a build in late April. So I do it and I get another idea. Why not merge the SwingXBuilder with main line since I now am getting a feel for how things should work? The manner I coded in, that is, to start anew and slowly mixing in proven and unproven code was just to get a better feel for how builders work but The plan had always been to subclass or merge. Besides some irreplaceable masterpiece, isn’t
it always better the second time around?

So on Thursday, I subclassed SwingBuilder and overrided the methods that have SwingX specific stuff. I would have been done quicker if I had realized that if a Groovy class is to override a Java class, the Groovy class must be typed. So now, my class is more concise and I don’t have to re-implement the new cool stuff in BETA such as the container widget. The unit tests combined the ones in mainline and mine; it all passes. So now that it is backward compatible with SVN HEAD, go ahead and use it. The one checked in Subversion was built with 1.1-Beta-2 on Java6, so if you aren’t running this, make sure you have Gant.

If there is sufficient demand, I could be convinced to back-port to v1.0.

Feel free to email me with any issues or problems: james.l.williams@gmail.com

Note: The widget registry in the SwingBuilder uses a HashMap. As such, the SwingX components override the classic Swing versions. This shouldn’t be a problem since the ones that exist in both are inherited. I don’t see a reason someone would explicitly use the classic Swing version of a widget over the SwingX version, given the chance.I should be updating the wiki sometime in the next week to let y’all know what is stable and what isn’t.

Oh yeah, supposedly if your ears are burning someone is talking about you[according to the old expression]. I checked Google Analytics and noticed Andres Almiray linked to me. That’s all for now.

Ayez un bon week-end!

It has been a good week

Lots has happened in the last week:

- My demo of the SwingXBuilder got me a crapload of hits .

- I’ve been dugg...no it wasn’t me or anyone I know...honest...

- I finally received the special start of coding gift from Leslie Hawthorne et al... I would love to tell y’all what it is but we have been sworn to secrecy until June 4th. I can tell you that it is signed copy of a totally appropriate book.

- I decided that I’m going to BarCamp Chicago and very likely presenting my work on the Groovy SwingXBuilder. It’ll motivate me to really work since I’ve been a little lazy the past couple of weeks. I haven’t been to Chicago in years and the last time I was, I was earning a slave’s wage babysitting and teaching little geeks 14 hours a day[I taught at Computer camp]. So why would anyone travel over a thousand miles from Florida to Illinois for an un-conference? Simple, BarCamp Jacksonville[FL] and Orlando are still in the planning phases, Miami already took place, and Chicago is much cooler than Albany. It’ll also be good practice and open my eyes to different perspectives that I may have not thought of.

Got any ideas for demos?

Edit: The suprise gift was Producing Open Source Software by Karl Vogel.