-
Notifications
You must be signed in to change notification settings - Fork 53
Add Multiple Select parameter #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@imagejan What would you suggest for the underlying data structure? I.e.: the actual type of the parameter? |
Maybe |
Not yet functional. See scijava/scijava-common#260.
I took a look, but this is a bit tricky type-wise. The /** Gets the list of possible values. */
List<T> getChoices();
/** Gets the item's current value with respect to the given module. */
T getValue(Module module);
/** Sets the item's current value with respect to the given module. */
void setValue(Module module, T value); Suppose we have a parameter like this:
The type But some hackish solution still seems feasible on the surface, so I started trying to implement something. But it does not work yet. And here is the Groovy script I used for testing: // @String(choices = {"quick", "brown", "fox"}) single
// @java.util.List(choices = {"the", "lazy", "dog"}) multiple
println("single = " + single)
println("multiple = " + multiple) |
Right, I get:
As far as I get it,
... so |
Yep. Upon further thought, I think changing the implicit contract for Instead, we should expand the This project is, unfortunately, too involved for me to tackle any time soon. It requires some experimentation, together with careful thought about the API and implications. |
This issue has been mentioned on Image.sc Forum. There might be relevant details there: https://forum.image.sc/t/how-to-customize-override-scijava-ui/43642/4 |
It would be useful to have a Multiple Select parameter in addition to the single choice that is possible with String parameters and the
choices
annotation.Maybe this could be implemented as a new
SelectionWidget
with two styles:What do you think?
The text was updated successfully, but these errors were encountered: