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

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

    Details

    • Subcomponent:
    • Resolved In Build:
      b86
    • CPU:
      generic
    • OS:
      generic

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: