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

Specification for SynthViewportUI.paintBorder(...) should mention that this method is never called

XMLWordPrintable

    • b86
    • generic
    • generic

      JDK: 7b78+
      Platforms: All

      Method javax.swing.plaf.synth.SynthViewportUI.paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) inherits specification from javax.swing.plaf.synth.SynthUI which says:

      "Paints the border."

      http://download.java.net/jdk7/docs/api/javax/swing/plaf/synth/SynthViewportUI.html#paintBorder%28javax.swing.plaf.synth.SynthContext,%20java.awt.Graphics,%20int,%20int,%20int,%20int%29

      In fact this method will not be called when JViewPort is shown on screen and this is actually mentioned in comments withing the method:

          /**
           * @inheritDoc
           */
          @Override
          public void paintBorder(SynthContext context, Graphics g, int x,
                                  int y, int w, int h) {
              // This does nothing on purpose, JViewport doesn't allow a border
              // and therefor this will NEVER be called.
          }

      Specification should be updated to tell explicitly that this method will not be called when viewport is repainted.

            rupashka Pavel Porvatov (Inactive)
            dbessono Dmitry Bessonov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: