Comments (2)
This feature looks like a pain to implement. For example, let's say the UI does respect previous filters by reading the possible values from the table instead of the model. If I initially open the filter popup and see:
[x] All
[x] Item1
[x] Item2
[x] Item3
If I select "Item2" and apply it, subsequent views of the filter will show:
[x] All
[x] Item2
Since the filter popup would only show values that actually appear in the filtered table, there is no way to reselect "Item1" or "Item3" unless all of the filters are reset. This is especially bad if you want to retain a number of filters that you already have applied to other columns.
In order for this to work, you would need a view of the table that does not contain any filters for the current column you wish to display the filter popup for. Easiest way would be to allow the popup to access all of the previous applied filters, take the subset of filters that are not applied to the popup's column, and manually filter the table with the filter subset (as opposed to using JTable's getValueAt() method). At a minimum, the JTableFilter will have to be reworked since the filters are currently composed in a recursive manner (i.e. the only way to remove a filter is to clear them all). The bigger problem is that the actual filtering mechanism is implementation dependent and doesn't necessarily map well between implementations (e.g. the JTableFilter composes RowFilters whereas a GlazedLists-based table would use FilterLists), so it may be difficult to map it back to a simple API to use within filtering GUI.
Additionally, the distinct item caching mechanism would need to be reworked or removed since the cache would need to be reset every time a filter is applied or unapplied. Personally, I have a feeling that the caching cannot be reworked since their isn't a full-proof way to listen to the table for filtering changes (e.g. listening for JTable filtering changes vs. JXTable filtering changes vs. GlazedLists filtering changes).
I think it is technically feasible, but I think a good chunk of the code needs to be redesigned to accommodate this request.
from oxbow.
Has this issue been resolved yet? I am looking for a smart solution.
from oxbow.
Related Issues (20)
- ComponentOrientation problem HOT 4
- Maven repository ? HOT 5
- Re-sizing the jpopupmenu HOT 15
- firetablestructurechanged preserves filter state but resets the table header renderer
- TableRowFilterSupport only sorting not filtering? HOT 3
- Support for custom rendering of DistinctColumnItem in TableFilterColumnPopup HOT 2
- Icon lost in TableHeader when Column is sorted HOT 2
- Broken download links (latest releases) HOT 1
- No compatibility with latest miglayout version HOT 2
- How can change foreground in the header? HOT 3
- Add custom actions
- How get and set Filter table? HOT 1
- Filtering with RegExp
- When is next release? HOT 3
- Table flicker on refresh when filter or sort applied
- Choice dialog - focus problem on java >= 9 HOT 1
- Lack of license HOT 4
- Travis Build fails HOT 1
- How to clear all filters HOT 3
- Sort icon not coming - urgent
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oxbow.