Skip to content
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

Add UI agnostic table selection listener #12

Open
frauzufall opened this issue Apr 3, 2020 · 1 comment
Open

Add UI agnostic table selection listener #12

frauzufall opened this issue Apr 3, 2020 · 1 comment

Comments

@frauzufall
Copy link
Member

Continuing the discussion in the forum, citing @ctrueden:

However: I would like to discuss & design a way of using SciJava’s UI-agnostic event mechanism for UI actions. That way, every table viewer implementation would fire the same SciJava events on the EventService , and you could listen for them, without worrying about whether it is a Swing-based UI or not.

Would this be something worth considering?

  • add a TableSelectionModel in scijava-table
  • publish TableSelectionChangedEvent(TableSelectionModel model, Table source) from the SwingTableDisplayPanel in scijava-swing-ui via EventService

.. this way I can load a GenericTable table, display it via UIService and filter TableSelectionChangedEvents by event.source == table.

Could this work bi-directional? I could publish my own TableSelectionChangedEvent(myOwnTableSelectionModel, genericTable) the table UI would listen to that and adjust accordingly.

There could be a general SelectionModel<T> and a SelectionChangedEvent, but what would T be then in case of a TableSelectionModel? It should communicate which column and which row is selected, so it could be TableSelectionModel extends SelectionModel<Pair<Column, Integer>> ...

@imagesc-bot
Copy link

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

https://forum.image.sc/t/ij2-interactive-results-table/19705/17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants