Skip to main content

Is it possible to change the filters used by a filterpipeline

4 replies [Last post]
paultaylor
Offline
Joined: 2003-12-04
Points: 0

Im using swingx 1.0 because Im tied to using Java 5

Is it possible to change the filters in a filterpipeline being used by a JXTable, in my code by table is initilized with 10 filters in the pipeliine, but in general use only two of them are being used but the other eight still hava negative effect on the EVT. So I wanted to modify the filter pipeline to add/remove the other filters only when needed, but it doesnt seem possible.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kschaefe
Offline
Joined: 2006-06-08
Points: 0

Just change pipelines.

Karl

paultaylor
Offline
Joined: 2003-12-04
Points: 0

Right, thats what Im trying to do now, although its a bit akward because you cant reuse your filters either.

i.e If I have two filters in pipleline and want to add another filter, I have to create three new filters, copy the state from the two filters to the new instances, then add all to new pipeline and replace old pipleine with new one.

kleopatra
Offline
Joined: 2003-06-11
Points: 0

As you know, SwingX 1.0 is no longer maintained - so you are basically on your own if you need to change/fix its behaviour ;-)

So if you need mutable pipelines, you might try to implement it yourself and publish in your incubator section which might be helpful for others with similar requirements

Thanks

Jeanette

 

paultaylor
Offline
Joined: 2003-12-04
Points: 0

HI, I now have a solution that works for me, each filter was a RowsKnownFIlter, which I submitted to the incubator a few years ago ( http://forums.java.net/node/669861) and I realised that I could replace the mutiple filters with a single filter and then just calculate the intersection of the set of rows for each enabled filter outside of the filter and then just pass it to the filter, now that I have just one filter in the pipeline things are working much better.