swingx
  1. swingx
  2. SWINGX-1581

JXHyperlink should respect JComponent.sizeVariant under Aqua and Nimbus look and feel

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Misc Component
    • Labels:
      None

      Description

      I have a view containing a number of hyperlinks and labels. If I loop over all components and putClientProperty("JComponent.sizeVariant". "small"), the JLabel components get smaller but JXHyperlink doesn't.

      It seems like the font size of a JXHyperlink should match the font size of the equivalently-sized JLabel.

      I had a look at why this isn't happening and it looks like the problem is that BasicHyperlinkUI (the only UI implementation) extends from BasicHyperlinkUI. So the code which is usually in the default button UI (AquaButtonUI) isn't getting run. One fix, then, could be to extend AquaButtonUI to make an AquaHyperlinkUI. This looked harder than I was prepared to take on, so my workaround is to keep around a label and call setFont() on all hyperlinks instead, getting the font from the label.

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated: