scijava / scijava-ui-swing

SciJava UI components for Java Swing.
BSD 2-Clause "Simplified" License
7 stars 11 forks source link

Support html hyperlinks in labels and messages #39

Open imagejan opened 6 years ago

imagejan commented 6 years ago

When using a hyperlink in a widget label or message:

#@ String (value = "<html><a href=\"http://imagej.net\">Link</a> in a message</html>", visibility = "MESSAGE", persist = false) message
#@ Integer (label = "<html><a href=\"http://imagej.net\">Link</a> in a label</html>", value = 42) number

the links are rendered blue and underlined, but they're not active hyperlinks.

We should improve SwingMessageWidget to support links by adding an ActionListener and calling platformService.open(url).

This was brought up by @LauLauThom, see this forum topic.