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

ListSelectionModel should provide NO_ROW_SELECTED constant

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • None
    • 7
    • client-libs

    Description

      A DESCRIPTION OF THE REQUEST :
      ListSelectionModels JavaDoc describes the value -1 to be returned for getMinSelectionIndex(), getMaxSelectionIndex() ... if the selection is empty.

      A constant NO_ROW_SELECTED = -1; could be helpful for clients of ListSelectionModel that check against empty selections.

      JUSTIFICATION :
      usage of constants is generally preferred over usage of numbers like -1. It makes the code more readable

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      provide the constant NO_ROW_SELECTED = -1 in ListSelectionModel

      Attachments

        Activity

          People

            Unassigned Unassigned
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Imported:
              Indexed: