Open coderazzi opened 12 years ago
Original comment by coderazzi coderazzi (Bitbucket: coderazzi, GitHub: coderazzi).
Hey, that is a very good idea.
Implementation-wise, it does not fit very well with the current model, so I guess I
will need some long time to get through it...
Thanks for the suggestion!
Original issue reported on code.google.com by coderazzi
on 2012-10-04 00:43:05
Original comment by Anonymous.
I think this is old, but… are you still working on this project?
I would be really insterested in multi-choice filter, like in https://github.com/eugener/oxbow
However, your UI is much more refined and usable, especially the way it shows within
the table.
The mentionned project provides a CheckedList that could be used to draw checkboxes
within the list. However, the code needs to be adapted since it is displayed in a popup
that will be dismissed on each click.
I already worked on a JMultiComboBox, but the logic is directly plugged in as a JComboBox
inherited classes, so it would be a lot of work to adapt it to a single PopupMenu.
Original issue reported on code.google.com by ZeGlandos
on 2015-01-19 16:38:34
Original comment by coderazzi coderazzi (Bitbucket: coderazzi, GitHub: coderazzi).
Hi, I'd like to consider this project as alive, but low demanding :-) I am covering
any bugs that impact the functionality, and I definitely use the tablefilter on my
projects, but I am quite reluctant to include new functionality.
The impact of this multiselection filter is rather large: it only affects the GUI,
indeed, but impacts all the core GUI components, including key navigation, basic user
interaction, etc. Honestly, I lack now the time to do it properly and cover all possible
regressions.
But if you feel like coding it yourself, I could definitely assist / support you.
Lu/
Original issue reported on code.google.com by coderazzi
on 2015-01-19 22:25:51
Original comment by Anonymous.
Indeed.
I've started to hack it, and after successfully drawing a checkbox in the list. This
is kind of an easy part, except that I had to understand the whole code for that (in
FilterListCellRenderer).
But then, I realized that the logic of a single selected element is everywhere in PopupComponent.
The MouseHandler should be the entry point to the currently clicked element, but the
rest of the code assumes that there is only one selected element: the renderer (not
so bad), the choiceSelected method (we could create a Proxy object?), and some other.
But it implies to hack the logic. A better way should be to use multi-selection list
everywhere, even when there is only one…
Anyway, there is a lot of work, I don't know if I'll have time for this…
Original issue reported on code.google.com by ZeGlandos
on 2015-01-20 15:20:41
Original comment by coderazzi coderazzi (Bitbucket: coderazzi, GitHub: coderazzi).
Well, indeed the PopupComponent assumes a single selection, but extending its interface
to support multiple choices shouldn't be the problem; the FilterListCellRenderer can
be extended to support checkboxes, and overall there is probably more work to ensure
than no bugs are included in the system than implementing the new functionality itself.
However, the whole interface (API and GUI) requires major thinking. For example:
-What is shown on the editor when multiple choices are selected? Currently, we just
show the selected one, so it is not a problem at all.
-API: we have currently a setContent method to define the choice. It is enough to just
pass a collection to this method?
The filtering itself already implements OR logic. In fact, in the very first versions
of tablefilter, the user could enter complex boolean expressions on the filters, such
as choice 1 OR choice 2 AND choice 3....
In any case, I would definitely not hack the solution. As you say, using multi-selection
as base model seems definitely the best approach.
Original issue reported on code.google.com by coderazzi
on 2015-01-21 00:05:43
Original report by altmany (Bitbucket: altmany, GitHub: altmany).
Original issue reported on code.google.com by
altmany
on 2012-10-03 23:18:07