Google+ Badge

Friday, February 24, 2012

JIDE upgrade and allowing user font size selection

Due to the new scheduler we needed to upgrade to the latest version of JIDE. First off JIDE has been a solid set of controls for our application but we don't upgrade very often so this was a multiple version number jump. JIDE is also very responsive to email requests and have fixed various issues we found in a timely manner. I highly recommend them if you need flexible grids, combobox tables, tree tables, etc.

During our upgrade we needed to toss out some code we used to override things JIDE did not do in the past and we also decided to allow the user to set the overall application font. Doing so brought up various cheats in our code. We had some of our controls return hard coded preferred dimensions. Now they use the current font to calculate their size. Some controls did not provide a preferred size. We use MigLayout pretty much everywhere so we had some hard coded "w 150!, h 22!" style parameters in the code which we removed.

We need to convert everything to MigLayout. I did a lot of the conversion from NetBeans FORM layout to MigLayout last year. Some of the panels used odd control overlaying - not card layout - so I left them alone. We know how to convert those and in fact have decided that overlay is really not the best way to handle the layout needs so we are replacing it anyway. Everyone will be happy to see all the forms gone. Removing the hard coding of sizes has caused us to clean up some of the MigLayout parameters too. Using size groups for buttons can keep things in a nice grid style layout along with better grow parameters have been a big help.

As far as preferred sizing goes the Mac needs slightly different sizes than the PC so we have some isMac() calls in the code to handle that. Under Win7 on the PC the drop down arrow to the right of a combobox sizes to match the overall combobox font, on the Mac it does not, that arrow is an image and sticks to one size.

We really should go through all the code and tag the buttons as OK, Cancel etc. so they show up in the right order on a Mac. Should have been done from the start and we are unsure if it would throw off our current Mac users to swap it at this point.

Our applications are used by medical staff to enter anesthesiology billing information. There are piles and piles of entry screens we are dealing with. The conversion has been handled by me and my boss over the past 10 days are we are nearing the finish. The ability to pick a larger font has been on our feature least for some time. A lot of the folks entering the data are 40+ years of age and they really want to have larger fonts. It will also help with demoing the product in a booth on a large monitor.

QA is going to have fun. They need to revisit every entry screen 4 times, PC large / small font then Mac large / small font. We have a FEST test script set up to bring up each screen and take a screen shot to assist in this area but you also need to verify TAB order and other oddness on the screen too. Now that JIDE has switched to using JComboBox etc. as their base classes for their controls it will be much easier to write FEST scripts for testing.

I have been doing all the Mac testing and tweaking up to this point. We don't want QA to start reporting things until we have given it a solid once over otherwise we will have a massive pile of issues of the type "we have not touched that code yet darn it" variety. Generally things have gone smoothly between the Mac and the PC. I do have one crash left on the Mac that does not occur on the PC. I am guessing this is related to something happening off the EDT that annoys the Mac. It is crashing way down in the Aqua Look and Feel.

I will probably move off of the conversion by the end of the day and move back on to the scheduler. All of this needed to be in place so I could have the new JAR files ready for me so it was a good breaking point. The new JIDE will go out with the next release but we don't know if the new scheduler will. I would rather have them go out in stages as both pieces will be a load for QA to digest.