Configurable form views & reorderable JList

Form views are now configurable. In itself, this was quite a bit of work to automatically generate an interface from an XML description. So now, the view like that shown in figure 1 below can be customised like the rest of the ISAcreator views (spreadsheets).

Figure 1 - ISAcreator form view for entry of Investigation information

However, after working on this new feature, I realised that due to there being clearly defined sections for Investigation Contacts, Publications etc (see figure 2), it’d be useful if users could move these sections around without having to click forever on a move up button in the ISAconfigurator.

Figure 2 - configure the form view in the ISAconfigurator

So, after looking at the Swing Hacks book, which demonstrates how to move single items in a JList, I modified this code and made it possible to move entire blocks up/down in a JList as shown in figure 3 below.

Figure 3 - Moving an entire section around in the JList

From what I know, this is the first (at least public) implementation of such a JList. The code can be found on the ISAconfigurator GitHub repository. I will probably move this to its own repository in the next few days when I get a little time.

Thanks to Joshua Marinacci for allowing me to reuse his code. Check out his new project called Amino, it’s very cool for developing Swing applications. You can even skin UI components using CSS.

Advertisements