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

Add an API for painting an icon with a SynthContext

XMLWordPrintable

      There are icons, which do not paint anything when Icon.paintIcon(Component c, Graphics g, int x, int y) method is used.
      These are e.g.: com.sun.java.swing.plaf.gtk.GTKIconFactory.MenuArrowIcon or javax.swing.plaf.nimbus.NimbusIcon. They require an SynthContext to paint something.

      There is a paintText() method in SynthGraphicsUtils, which can be used to paint an icon when null text is provided. However, it's not possible to position the icon to some specific coordinates.

      Please some equivalent to sun.swing.plaf.synth.SynthIcon.paintIcon(Icon icon, SynthContext context, Graphics g, int x, int y, int w, int h) into the APIs. E.g. into SynthGraphicsUtils.

            alexsch Alexandr Scherbatiy
            mentlich Martin Entlicher
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: