Slippy maps for Java Swing GUIs: SwingX-WS
Asked Answered
T

3

6

This post's purpose is to gather in one place all useful info and material needed in order to implement slippy maps in a Swing application using the SwingX-WS library, now that the SwingLabs website is no more -- in spite of the fact that, however, SwingX development is still active.

Tosh answered 1/12, 2013 at 16:35 Comment(4)
+1 for both question and answer (looked up "slippy" - my learn item of the day :-)Aversion
I'm not sure this sort of question is on-topic anymore, but since you're self-answering I'll refrain from kneejerk voting myself. (Also: JavaFX is probably the way to go for advanced widgets these ways. It integrates some of the concepts that SwingLabs did in a clunky way, like binding.)Smatter
Not really, for the overwhelmingly majority of java GUIs are still swing-based, despite JavaFX being a very good framework that I do use myself for some projects. Throw in JavaFX steep-ish learning curve, and the know-how inertia of thousands of companies/developers relying on Swing for both their new and not-so-new applications, the fact that there might be good reasons (that I'm not meant to know about) for them to stick to Swing, and the fact that nowadays more and more applications have the rising need for slippy maps, and suddendly this topic becomes hot again. And if I can [continues]Tosh
[continued] help some users by not having them dig through what I already sorted out, well I'm happy with that. Yes, one could build some fancy JavaFX-based solution and embed it in his swing project with a JFXPanel or something, but that would call for a change in build scripts and [a lot of] extra [boilerplate-]coding to glue together the two different paradigms. With SwingX-ws (have been using it with great results for quite some time now), on the other hand, it's an immensely efficent process, and time is the most precious asset IMHO.Tosh
T
9

So, first things first, the as-of-today up-to-date jars, built from the latest sources.

SwingX-ws:

SwingX v. 1.6.5-1 (required runtime dependency, requires Java6 or newer):

A few words on SwingX: it's an amazing project meant to extend swing functionality with extra widgets (a very well made webstartable demo here, with code samples and everything), nice-looking, powerful, fast and with no funky dependencies. One big plus IMHO is that integrates really beautifully with the modern Nimbus L&F (unlike jide-oss, for example, which, albeit very good itself, integrates poorly with Nimbus -- it has, however, a very nice alternative L&F, called Xerto, but this is another story...).

As for documentation, the sources that showcase swingx-ws use best are a series of articles written by Josh Marinacci, listed here in chronological order:

In the [hopefully unlikely] event of needing to report a bug, the project's issue-tracking page can be found on JIRA.

Tosh answered 1/12, 2013 at 16:35 Comment(0)
P
1

A descendant of swingx-ws called JXMapViewer2 can be found on github. As of April 2019, it seems to be reasonably active.

Parochialism answered 25/4, 2019 at 17:32 Comment(0)
R
0

swingx-ws-1.0.jar is compatible with swingx-1.6.jar but not with swingx-all-1.6.4.jar.
If you are using swingx-all-1.6.4.jar and wish to use Tiles as you did with swingx-1.6.jar, here is a workaround.

Copy

org.jdesktop.swingx.util.GraphicsUtilities.java
from swingx-1.6.4 to a new package of your own (the swingx-1.6 version) :
org.jdesktop.swingx.graphics.GraphicsUtilities.java
Rehabilitate answered 29/9, 2016 at 8:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.