Following the comments from the previous entry that introduced a Swing breadcrumb bar component that allows browsing local and remote SVN repositories, the latest 2.1dev drop of Flamingo has the following new features:
- Kamil and Danno pointed out that the network-related tasks (such as connecting to an SVN repository and fetching folder contents) shouldn’t be done on the EDT. I guess this is what happens when one pays too much attention to pushing the pixels :) The latest drop uses the JDK 5.0-compliant version of
SwingWorkerand offloads all relevant tasks off the EDT. The end result is that all breadcrumb bar core implementations (including the local file system browser) should be much more responsive and without any UI freezes.
- AC suggested that i should provide an adapter to
org.jvnet.flamingo.bcb.core.BreadcrumbTreeAdapterSelectordoes just that, allowing wrapping an existing
TreeModelwith minimal additional application logic. The only additional logic you need to provide stems from my current reluctance to rely on the existing tree cell renderers, especially when a custom renderer doesn’t extend a
JLabel. There are three constructors in this class, and you can look at
test.bcb.TreeModelAdapterBreadCrumbTestto see how easy it is to wrap and adapt an existing tree or tree model.
- Eugene was confused by the proximity of the SVN repository selection combobox and the breadcrumb bar itself in the screenshots. This prompted me to write an experimental
org.jvnet.flamingo.bcb.core.BreadcrumbMultiSvnSelectorclass. Its root selector allows selecting an SVN repository, and all the other selectors browse through the selected repository. There have been some synchronization issues, since everything is done off EDT in separate
SwingWorkertasks; these have been hopefully addressed. You can play with this component or the
test.bcb.MultiSvnBreadCrumbTesttest application and let me know if you run in some deadlocks / synchronization / inconsistency issues.
Thanks to everybody for your insightful comments. Hope you like the new version better. Here is the link to the WebStart SVN browser application once again (this time without hogging EDT):
For more thoughts from the original creator of Swing breadcrumb bar, Rick Jelliffe, click here.
Update based on the comments: the latest version of Flamingo has the following fixes
- Immediately showing selected element with ellipses (…) to indicate that the choices are loading
- Not showing the choices selector when there are no choices
- Fix on pressing the choices selector arrow when popup is showing
Thanks, Eugene and Matt for valuable feedback; it is much appreciated. You’re welcome to run the WebStart application and see if it behaves in a more user-friendly way.