[SWINGX-1317] PatternPredicate causes exception with testColumn -1 (ALL) Created: 29/Apr/10  Updated: 28/Jan/11  Resolved: 03/Nov/10

Status: Resolved
Project: swingx
Component/s: Renderer
Affects Version/s: 1.6.1
Fix Version/s: 1.6.3

Type: Bug Priority: Major
Reporter: Karl Schaefer Assignee: kleopatra
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 1,317

 Description   

If we use new PatternPredicate(".e.", -1) in a JXTable we get an
IllegalArgumentException because the test column is not a valid column. We can
place a fix in PatternPredicate, but I don't believe that's the correct
location. I believe that ComponentAdapter should handle the -1 as part of its
contract. We should update ComponentAdapter and TableAdapter (the only
override) to ensure that we are correctly handling -1.



 Comments   
Comment by kleopatra [ 30/Apr/10 ]

definitely a bug - but on the PatternPredicate side, IMO: ComponentAdapter is documented
(everywhere?) to only accept valid indices.

added failing test to HighlighterIssues

CU
Jeanette

Comment by kleopatra [ 30/Apr/10 ]

definition of "testColumn == All" is missing/fishy/pending: looks like it doesn't handle
the case at all

Cheers
Jeanette

Comment by Karl Schaefer [ 30/Apr/10 ]

Hmm, guess you're right. Just feels like another -1 == ALL will require
duplicate code. Oh well, that's probably better. Ensures that
ComponentAdapter is clean.

Comment by kleopatra [ 03/Nov/10 ]

clarified contract:

  • both test- and decorateColumn are either a single value or ALL
  • in testColumn the ALL is actually a logic operator of how look for matches in several
    columns - principally that could be AND or OR. Decided for OR to be consistent with RowFilters.GeneralFilter
    which includes rows if any of the columns meet the include criterion
  • in decorateColumn the ALL means ... well ... all
  • implemented the match and highlight logic accordingly
  • added convenience contructors
  • add unit test in HighltPredicateTes
  • added visual test in HighlighterClientVisualCheck
Comment by kleopatra [ 03/Nov/10 ]

error fixed

Generated at Sun Apr 30 18:51:50 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.