[SWINGX-1374] RolloverProducer fires click when table is not enabled Created: 04/Dec/10  Updated: 08/Dec/10  Resolved: 08/Dec/10

Status: Resolved
Project: swingx
Component/s: Table
Affects Version/s: 1.6.2
Fix Version/s: 1.6.3

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

Operating System: All
Platform: All

Attachments: Java Source File Test.java    
Issuezilla Id: 1,374


The issue is that the RolloverProducer fires a click event even when the table
is not enabled. Or maybe the producer should fires the event but the
RolloverController should do nothing?

The issue is in the rollover subcomponent but it doesn't exists and I encounter
it on a table but the same issue applied on the tree and the list.

Comment by kleopatra [ 06/Dec/10 ]

good catch!

Should detangle what exactly is wrong behaviour. Thinking aloud, in no particular order

  • clearly, clicking on a hyperlink renderer shouldn't activate the hyperlink action. The
    "nearest" handler is the XXRolloverController
  • in windows, disabled components have no visual rollover effects, so probably rolloverHighlighter
    shouldn't as well. Here it would be the HighlightPredicate which could do the check
  • on the other hand, tooltips are shown even for disabled components
  • the rolloverProducer is doing nothing but mapping mouse coordinates into cell coordinates.
    Mouse events are fired always and leave the responsibility of respecting enablement state
    to consumers, for consistency the producer should do the same

anything else?


Comment by kleopatra [ 06/Dec/10 ]

hmm ... added some code to the visual test method interactiveDisabledCollectionViews()
in JXTableVisualCheck, and cant reproduce any mis-behaviour. Would you please have a look
and elaborate a bit what exactly you think is wrong?


Comment by kleopatra [ 06/Dec/10 ]

as usual, a small runnable code example would be helpful as well.


Comment by klbsjpolp [ 06/Dec/10 ]

Created an attachment (id=324)
Test case for the defect.

Comment by klbsjpolp [ 06/Dec/10 ]

I can't think of a simpler test case. The problem is when the cell is non
editable, the rollover renderer is enabled (it doesn't know that the table is
not) and the table is not enabled.

Comment by kleopatra [ 08/Dec/10 ]

ahh ... now I see. Thanks for the test case And you were right: same problem in tree/list

fixed in RolloverController: as of revision #3904

  • changed isClickable to check the target's enabled property
  • added RolloverVisualCheck (adapted from the given test case)
Generated at Sun Apr 30 11:04:35 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.