swingx
  1. swingx
  2. SWINGX-1374

RolloverProducer fires click when table is not enabled

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.6.3
    • Component/s: Table
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,374

      Description

      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.

        Activity

        Hide
        kleopatra added a comment -

        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?

        Thanks
        Jeanette

        Show
        kleopatra added a comment - 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? Thanks Jeanette
        Hide
        kleopatra added a comment -

        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?

        Thanks
        Jeanette

        Show
        kleopatra added a comment - 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? Thanks Jeanette
        Hide
        kleopatra added a comment -

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

        Thanks
        Jeanette

        Show
        kleopatra added a comment - as usual, a small runnable code example would be helpful as well. Thanks Jeanette
        Hide
        klbsjpolp added a comment -

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

        Show
        klbsjpolp added a comment - Created an attachment (id=324) Test case for the defect.
        Hide
        klbsjpolp added a comment -

        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.

        Show
        klbsjpolp added a comment - 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.
        Hide
        kleopatra added a comment -

        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)
        Show
        kleopatra added a comment - 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)

          People

          • Assignee:
            kleopatra
            Reporter:
            klbsjpolp
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: