swingx
  1. swingx
  2. SWINGX-1384

JXComboBox/Highlighters: support highlight of selected item which is not in list

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.6.3
    • Fix Version/s: 1.6.6
    • Component/s: Highlighter
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,384

      Description

      As per ComboBoxModel doc, the selected item may or may not be part of the list, Highlighters
      (if useHighlightersOnCurrent is true) must decorate in both cases.

      Needs a bit of thought (here some musings only):

      • the problem is how to make the ComponentAdapter cope
      • ComponentAdapter's row field must be a "valid view coordinate": in all other collection
        views that means != -1
      • in a combo, the -1 is mapped to selectedItem (in the ui-delegate, f.i.), not well documented
        though
      • we could do the same in the ComboBoxAdapter, allowing a -1 row view coordinate in all
        methods which take a row view parameter: the implementations of those would internally
        check for the -1 and return the selecteditem or its string rep, as required
      • would that be okay for client code? First guess is yes: We never said anything about
        the concrete values, only that the row/column param can be fed into all the methods and
        succeed without throwing exception
      • problem might be the row conversion methods, though: a -1 in modelToView is doc'ed as
        not-in-view (really?)

      Hmm...

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated: