I was wondering if it possible to display a text label using the @script parameters for example to add a link to a wiki page of associated documentation.
I could use a @String but the idea would be to have something immutable. I dont think it is possible currently, possible future improvements ? Eventhough it is not a parameter per see…
You can use the
visibility option for a
#@ String(visibility="MESSAGE", value="Something") somethingString #@ String(value="Something else") somethingElseString
String will be an immutable label, while the second can be changed.
Thanks ! That could be worth adding to the wiki.
Is there some formatting to display hyperlink as well ?
It supports HTML as far as I know. You can try wrapping your text in
<html></html> and add a link this way.
# @String(visibility="MESSAGE", value="<html><a href='http://forum.imagej.net/'>This is my link</a></html>") Footer
indeed produce a html-formatted string but the link is not clickable
Sorry, should have thought about that!
@imagejan: Any idea where an issue for this should live?
scijava-ui-swing is the correct repository for this.
The class responsible for displaying messages is
SwingMessageWidget, which currently simply generates a
JLabel with the text:
There’s some extra logic needed to make links work in
JLabels, as discussed e.g. in these stackoverflow posts:
I opened an issue to track this: