Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4093066

Can't set the selectionMode in ListSelectionModel

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.1.4, 1.2.0
    • Fix Version/s: 1.1.5
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      1.1.5
    • CPU:
      unknown, sparc
    • OS:
      solaris_2.5.1, solaris_2.6
    • Verification:
      Not verified

      Description

      Support for a selectionMode in JList and ListSelectionModel, was never
      implemented (as of Swing0.6) It did make it into TreeSelectionModel. This is basic list functionality.

      From: David Geary <###@###.###>
      To: swing feedback <###@###.###>
      Subject: BUG: JList Non-Contiguous Multiple Selection
      Date: Thu, 13 Nov 1997 15:47:00 -0600

      It seems that BasicListUI only allows multiple selection of contiguous
      items. Is there a way to do non-contiguous multiple selection?

      As far as I can tell, BasicListUI does not allow non-contiguous multiple
      selection, even though it is supported via
      ListSelectionModel.addSelectionInverval().

      Unless I am mistaken, the only way to have non-contiguous multiple
      selection in a list is to implement a new look and feel - ugh.
      Hopefully, I'm mistaken.

      btw, the javadoc for JList is confusing regarding this point:

          "A component that allows the user to select one or more objects from
      a list ..."
      and later on ...
          "By default JList supports single selection, i.e. zero or one index
      can be selected..."

      It seems to me that neither statement is accurate.


      PS: I'd really appreciate it if someone could either point out how to
      do non-contiguous multiple selection in a JList, or verify that it's
      currently not implemented. Thanks.


      david


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sswingtrsunw Swingtraq Swingtraq (Inactive)
              Reporter:
              sswingtrsunw Swingtraq Swingtraq (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: