swingx
  1. swingx
  2. SWINGX-386

No way to turn off SelectionMapper (with patch!)

    Details

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

      Operating System: All
      Platform: Macintosh

    • Issuezilla Id:
      386

      Description

      For Glazed Lists custom ListSelectionModel to work with JXTable, it's necessary to turn off the JXTable
      selection mapper. I've created a patch for SelectionMapper that makes this possible.

      My patch also does some cleanup:

      • cleans up callers to lock, to always call unlock
      • cleans up lock/unlock concepts, renaming them to setEnabled()
      • renames 'restoreSelection' to 'mapToView'
      • makes SelectionMapper an interface, with DefaultSelectionMapper as implementation

      Please review and commit this patch as soon as convenient!

      1. DefaultSelectionMapper.java
        9 kB
        jessewilson
      2. SelectionMapper.patch
        20 kB
        jessewilson

        Activity

        Hide
        jessewilson added a comment -

        Created an attachment (id=82)
        patch, requres DefaultSelectionMapper.java

        Show
        jessewilson added a comment - Created an attachment (id=82) patch, requres DefaultSelectionMapper.java
        Hide
        jessewilson added a comment -

        Created an attachment (id=83)
        drop it in src/java/org/jdesktop/swingx/decorator/

        Show
        jessewilson added a comment - Created an attachment (id=83) drop it in src/java/org/jdesktop/swingx/decorator/
        Hide
        kleopatra added a comment -


        applied as-is - looks good!

        Show
        kleopatra added a comment - applied as-is - looks good!
        Hide
        kleopatra added a comment -

        Just noticed that the patch made getSelectionMapper() public - I assume you need
        to access the method from outside client code? Otherwise I would revert to its
        old protected status

        Jeanette

        Show
        kleopatra added a comment - Just noticed that the patch made getSelectionMapper() public - I assume you need to access the method from outside client code? Otherwise I would revert to its old protected status Jeanette
        Hide
        jessewilson added a comment -

        If SelectionMapper isn't public, then I need a method on JXTable that will call
        getSelectionMapper.setEnabled(false); to disable selection mapping. If you'd prefer this, do it up!

        Show
        jessewilson added a comment - If SelectionMapper isn't public, then I need a method on JXTable that will call getSelectionMapper.setEnabled(false); to disable selection mapping. If you'd prefer this, do it up!
        Hide
        kleopatra added a comment -

        Jesse,

        so I suspected correctly that the change wasn't accidental <g>. While I'm not so
        keen on changing table#s api right now - adding a cover method in this case
        might be a good move: Mustang table should have a similar problem? Or does it,
        didn't look into it for a while?

        Show
        kleopatra added a comment - Jesse, so I suspected correctly that the change wasn't accidental <g>. While I'm not so keen on changing table#s api right now - adding a cover method in this case might be a good move: Mustang table should have a similar problem? Or does it, didn't look into it for a while?

          People

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

            Dates

            • Created:
              Updated:
              Resolved: