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

XMLWordPrintable

    • Type: CSR
    • Resolution: Approved
    • Priority: P3
    • 17
    • Component/s: client-libs
    • None
    • behavioral
    • minimal
    • No behavior change - specification only so minimal risk
    • Java API
    • SE

      Summary

      Make it clear in the specification of

      <pre> javax.swing.CellRendererPane.paintComponent(Graphics, Component, Container, Rectangle) </pre>

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

      Problem

      The specification of

      <pre> javax.swing.CellRendererPane.paintComponent(java.awt.Graphics, java.awt.Component, java.awt.Container,java.awt.Rectangle) </pre>

      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)
      

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

              Created:
              Updated:
              Resolved: