I’ve already earlier whined about SlickerBox, the look-and-feel (L&F) toolkit used in ProM. Not how it looks, as that’s pretty neat, but that it is not a real L&F using Java’s pluggable L&F (PLAF) architecture, so as soon as you go beyond what is built-in, you bang your head against a wall consisting of troublesome customization and hard-coded color values.
As I don’t have time (nor the inclination to be frank) to rewrite SlickerBox using PLAF, I did the next best thing: cleaned up and released all my widgets for common use. Initially, I did this to be able to use the Widgets in all my plug-ins and didn’t feel that copying them around would be an optimal solution. I’ve also received feedback that I’m not the only one with this problem, so I hereby urge everybody to use this toolkit and contribute it, so in time we’ll have a toolbox of widgets for ProM, which makes it easier to make spiffy as well as consistent user-interfaces.
Currently, the toolkit consists of replacements for JTextField, JTextArea, JList, JTable, a new panel for showing properties in a neat way, and a couple of helpers. The components have an API similar to the corresponding Swing components, but it is not complete; it only supports what I’ve come to need! Feel free to extend widgets with needed APIs and add new widgets. Note that especially event-handling is treacherous at this moment; most widgets seem to provide event handling as you’d expect, but doesn’t. This is because they are typically really some sub-class of JPanel, so event handlers will be installed on the wrong components.
I expect the package to evolve very quickly this week. Get the package at https://svn.win.tue.nl/repos/prom/Packages/Widgets/Trunk/. There’s also a release at https://svn.win.tue.nl/repos/prom/Releases/Packages/Widgets/ (currently version 6.1.1, but that may change later today).
In addition to the current set of widgets, I’ll add the inspector (described here) and some visualizations using it. If I find anything else while refactoring my code, I’ll add that as well.
Let me give a quick run-down of the widgets available no, mention the helpers, and show examples of the widgets in use:
- Input a single line of text
- Input or show larger blocks of text
- Display a scrollable list of things. Allows selection.
- Show tabular data.
- A panel with a header.
- A panel which makes it easy to input multiple parameters; perfect for configuration dialogs. When a mouse hovers over a property, its group is highlighted. These panels use widgets from this package or created using com.fluxicon.slickerbox.factory.SlickerFactory (the checkboxes and radio buttons).
- A header styled to match ProM and always aligned to the left. Used for ProMHeaderPanel.
- A JPanel with a border. Similar to com.fluxicon.slickerbox.components.RoundedPanel except only a border is painted rather than also the background of the component. Used for ProMTextField to make the light border around it.
- Various symbolic names for colors used in Widgets.
- Various images useful for setting up tabbed panels. Borrowed from the Log plug-in.
Time person of the year 2006, Nobel Peace Prize winner 2012.