Closed GoogleCodeExporter closed 9 years ago
Hi, Fabien,
again, sorry for the very late reply.
The first option that you propose would be quite expensive to implement (on
performance) on the new library's version (have a look to the implementation
done for adaptive options). Nevertheless, could be toggled on/off in the
API.... I will check how bad can be the performance....
For the parser, I think I understand now better your other issue with
setDefaultOperator. In the current implementation, it is not needed to use
regular expressions; for example, to select all rows starting with 'Fan' it
would be enough to write 'Fan*' [which is, I think, more intuitive than writing
'-s Fan']
This applies to all types. For example, on a column with integers, writing '4*'
returns all rows starting with '4', even if the user didn't specify the
operator '~'
That is, the implementation uses the operator '=' or '~' as it is best suited.
I will study the patch now, again, sorry for the late reply,
Best regards,
Lu.
Original comment by coderazzi
on 16 Feb 2011 at 7:06
Hi, Fabien,
I checked your patch, thanks for submitting it. I have reimplemented it for the
4.0 version, not when the caret is updated but when the text itself changes,
and the performance is not bad at all. Of course, it depends on the number of
rows in the table.
But the UI must be more advanced. In this moment, to write 'Fan' you will
obviously start as 'F', then 'Fa', then 'Fan', but in the intermediate steps,
the table would filter out all the rows! ('F' is not 'F*'). I guess it is a
matter of interpreting 'F' as 'F*', etc, but then what happen if the user just
want to have 'F'?
Any suggestions are welcome, I will be thinking how to better introduce it (the
behavior is rather cool!)
Best regards,
Lu.
Original comment by coderazzi
on 18 Feb 2011 at 1:28
Hi Lu,
Thanks for checking my modification, I can tell you that users are very
impressed with the result...
I implemented a generic table, merging TableFilter with JXTable, which permits
the user to totaly customize the filter using the "ControlButton" feature of
jxtables (see attachment). I think this class could be added in a swingx
utility library as a generic option, if I make it even more generic. I will
submit it later. It may be interesting to implement a "FilterControlButton"
that can be integrated directly in the top right scrollpane area, but not tied
to swingx implementation. I will eventually invest some time in both solutions,
and submit the code.
Concerning th "F" or "F*" thing, I think it is totaly tied to what the
programmer wants. I think it makes sense to activate the "AutoUpdate" feature
only in two case:
* the programmer set the default filter to "Start with (~s)" or "Contains (~c)"
* the user is aware of behaviour (he has to enter the * if the filter is ~)
Again, since it is a feature that can be disabled, the programmer will be free
to do whatever suits the users...
Best regards,
Fabien
Original comment by fabien.n...@gmail.com
on 18 Feb 2011 at 1:51
Attachments:
The attachment was bad
Original comment by fabien.n...@gmail.com
on 18 Feb 2011 at 1:55
Attachments:
Hi, Fabien,
I have come with an idea on how to implement it in a non-obtrusive mode: if
instant filtering is enabled, it only works if the user does not enter any
operator. In addition, it will do 2 searches: one for the exact input, and, if
none found, one for the wildcard expression -it can be done very fast, in
fact-. That is, if the user has entered '11', but there is no such value on the
column, it will show those matching '11*'
It still does not include all your flexibility, but without adding secondary UI
-like you did-, I think it would be more complicated and less intuitive to
handle.
Could you attach a working example of your code? Meme si l'example est en
francais!
Cheers,
Lu
Original comment by coderazzi
on 21 Feb 2011 at 3:18
Version 4.1.0 includes the concept of instant filtering.
Implementation is rather different, and not exactly compatible with the
proposal included in this issue.
Original comment by coderazzi
on 14 Mar 2011 at 3:37
Original comment by coderazzi
on 14 Nov 2011 at 11:11
Original issue reported on code.google.com by
fabien.n...@gmail.com
on 26 Oct 2010 at 2:44Attachments: