swingx
  1. swingx
  2. SWINGX-1311

IconHighlighter: add setting icon in WrappingProvider

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.6.3
    • Component/s: Highlighter
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,311

      Description

      WrappingProvider guarantees to reset both icon and text in each round of config, so it
      is safe to allow setting the Icon in the Highlighter

      forum discussion
      http://forums.java.net/jive/thread.jspa?threadID=79226&tstart=0

      related Issue 1080 and Issue 1090

      we might consider to add an interface IconAware with getters/setters for an icon property.
      Its task would be to tag rendering components which are guaranteed to have their icons
      reset by the provider, a provider would create rendering components implementing the interface,
      if appropriate. The IconHighlighter would be only touch the icon if it detects the interface
      (and plain JLabel for backward compatibility, all core renderers reset the icon as well,
      not much harm done)

      Jeanette

        Activity

        Hide
        kleopatra added a comment -

        done as outlined above

        • added IconAware
        • changed JRendererLabel, WrappingIconPanel to implement IconAware
        • changed IconHighlighter to handle IconAware (as well as JLabel for backward compatibility)
        • updated ComponentProvider doc
        • added tests
        Show
        kleopatra added a comment - done as outlined above added IconAware changed JRendererLabel, WrappingIconPanel to implement IconAware changed IconHighlighter to handle IconAware (as well as JLabel for backward compatibility) updated ComponentProvider doc added tests
        Hide
        kleopatra added a comment -

        all tests passing locally, Hudson still down closing anyway

        Show
        kleopatra added a comment - all tests passing locally, Hudson still down closing anyway

          People

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

            Dates

            • Created:
              Updated:
              Resolved: