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

Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 17
    • client-libs
    • None
    • behavioral
    • minimal
    • No behavior change - specification only so minimal risk
    • Java API
    • SE

      Summary

      Make it clear in the specification of

       javax.swing.CellRendererPane.paintComponent(Graphics, Component, Container, Rectangle)
      

      which other paintComponent(..) method it delegates to.

      Problem

      The specification of

      javax.swing.CellRendererPane.paintComponent(java.awt.Graphics, java.awt.Component, java.awt.Container,java.awt.Rectangle)
      

      is not clear which to which method the call is delegated.

      Solution

      Update the specification to clearly describe to which method the call is delegated, and with what parameters.

      Specification

              /**
      -     * Calls this.paintComponent() with the rectangles x,y,width,height fields.
      +     * Calls this.paintComponent(g, c, p, r.x, r.y, r.width, r.height) where
      +     * {@code r} is the input {@code Rectangle} parameter.
                *
                * @param g  the {@code Graphics} object to draw on
                * @param c  the {@code Component} to draw
                * @param p  the {@code Container} component actually drawn on
                * @param r  the {@code Rectangle} to draw in
          public void paintComponent(Graphics g, Component c, Container p, Rectangle r)

            psadhukhan Prasanta Sadhukhan
            dbessono Dmitry Bessonov
            Alexey Ivanov, Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: