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

ListSelectionModel should provide NO_ROW_SELECTED constant

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 7
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:

      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

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

              Dates

              Created:
              Updated:
              Imported:
              Indexed: