scijava-common icon indicating copy to clipboard operation
scijava-common copied to clipboard

Support for List as an input type

Open hinerm opened this issue 10 years ago • 7 comments

It would be great if an input could be a List of a supported sub-type. The List widget would render plus and minus buttons to add or remove widgets of the sub-type.

Migrated-From: http://trac.imagej.net/ticket/792

hinerm avatar Aug 29 '14 17:08 hinerm

I think there should also be a toggle to decide if the list is row or column major.

For the actual numeric notation, I propose moving Range to SJC and genericizing it. Then we can accept String notation for each row/column.

hinerm avatar Aug 29 '14 17:08 hinerm

What are the rows and columns here...? Isn't that only applicable to 2D data structures like tables?

ctrueden avatar Aug 29 '14 18:08 ctrueden

Sorry, I was conflating things.

I don't think List alone provides a nice way to enter tables so it doesn't really solve the my use case.. I was imagining entering a list of 1D Ranges to build tables.. but maybe that's a bad idea and/or not really necessary right now

hinerm avatar Aug 29 '14 20:08 hinerm

Right, support for Range inputs is one thing. Support for List that has + and - buttons is something else.

The reason I drew your attention to this List thing was not to suggest that it would solve your use case, but rather to point out that it is a potentially conflicting use case. If we interpret List and array inputs to mean "variable number of the constituent type's widgets" that is somewhat incompatible with treating a particular array as a single input with its own widget type.

Further thought and discussion required probably!

ctrueden avatar Aug 29 '14 21:08 ctrueden

@tibuch started work on a general-purpose Swing list widget here. Further effort needed to polish this up. (The widget itself belongs in scijava-ui-swing, but it is highly relevant to this issue.)

ctrueden avatar Sep 27 '17 20:09 ctrueden

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/scijava-command-imageplus/57397/4

imagesc-bot avatar Sep 09 '21 12:09 imagesc-bot

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/scijava-command-imageplus/57397/8

imagesc-bot avatar Sep 09 '21 13:09 imagesc-bot