<Swing Dev> RFR: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

<Swing Dev> RFR: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to

Prasanta Sadhukhan-2
Specification for method
javax/swing/CellRendererPane.html#paintComponent(java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle)
is not perfectly clear which method the call is delegated to.

Updated spec to clarify.

-------------

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

Changes: https://git.openjdk.java.net/jdk/pull/3146/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3146&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8263907
  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3146.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3146/head:pull/3146

PR: https://git.openjdk.java.net/jdk/pull/3146
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to

Prasanta Sadhukhan-2
On Tue, 23 Mar 2021 06:10:32 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

> Specification for method
> javax/swing/CellRendererPane.html#paintComponent(java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle)
> is not perfectly clear which method the call is delegated to.
>
> Updated spec to clarify.

Any reviewers?

-------------

PR: https://git.openjdk.java.net/jdk/pull/3146
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to

Sergey Bylokhov-2
In reply to this post by Prasanta Sadhukhan-2
On Tue, 23 Mar 2021 06:10:32 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

> Specification for method
> javax/swing/CellRendererPane.html#paintComponent(java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle)
> is not perfectly clear which method the call is delegated to.
>
> Updated spec to clarify.

src/java.desktop/share/classes/javax/swing/CellRendererPane.java line 204:

> 202:     /**
> 203:      * Calls this.paintComponent(g, c, p, x, y, w, h) with the input parameter
> 204:      * {@code Rectangle} x,y,width,height fields.

Probably the simple "Calls paintComponent(g, c, p, r.x, r.y, r.width, r.height)" will work?

-------------

PR: https://git.openjdk.java.net/jdk/pull/3146
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to

Prasanta Sadhukhan-2
On Thu, 1 Apr 2021 17:16:45 GMT, Sergey Bylokhov <[hidden email]> wrote:

>> Specification for method
>> javax/swing/CellRendererPane.html#paintComponent(java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle)
>> is not perfectly clear which method the call is delegated to.
>>
>> Updated spec to clarify.
>
> src/java.desktop/share/classes/javax/swing/CellRendererPane.java line 204:
>
>> 202:     /**
>> 203:      * Calls this.paintComponent(g, c, p, x, y, w, h) with the input parameter
>> 204:      * {@code Rectangle} x,y,width,height fields.
>
> Probably the simple "Calls paintComponent(g, c, p, r.x, r.y, r.width, r.height)" will work?

Then the question might arise what is r.x, r.y....I guess my wordings makes it more clearer with pointer to input paramter.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3146
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to

Prasanta Sadhukhan-2
On Mon, 5 Apr 2021 05:03:38 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

>> src/java.desktop/share/classes/javax/swing/CellRendererPane.java line 204:
>>
>>> 202:     /**
>>> 203:      * Calls this.paintComponent(g, c, p, x, y, w, h) with the input parameter
>>> 204:      * {@code Rectangle} x,y,width,height fields.
>>
>> Probably the simple "Calls paintComponent(g, c, p, r.x, r.y, r.width, r.height)" will work?
>
> Then the question might arise what is r.x, r.y....I guess my wordings makes it more clearer with pointer to input paramter.

Can this please be approved if there's no more comments?

-------------

PR: https://git.openjdk.java.net/jdk/pull/3146
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to

Alexey Ivanov-2
On Tue, 6 Apr 2021 11:11:56 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

>> Then the question might arise what is r.x, r.y....I guess my wordings makes it more clearer with pointer to input paramter.
>
> Can this please be approved if there's no more comments?

> Probably the simple "Calls paintComponent(g, c, p, r.x, r.y, r.width, r.height)" will work?

…where `{@code r}` is the passed in rectangle.

I'd add spaces after commas: x, y, width, height.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3146
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to [v2]

Prasanta Sadhukhan-2
In reply to this post by Prasanta Sadhukhan-2
> Specification for method
> javax/swing/CellRendererPane.html#paintComponent(java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle)
> is not perfectly clear which method the call is delegated to.
>
> Updated spec to clarify.

Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:

  javadoc change

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3146/files
  - new: https://git.openjdk.java.net/jdk/pull/3146/files/961b47bc..c74fbd1b

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3146&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3146&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3146.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3146/head:pull/3146

PR: https://git.openjdk.java.net/jdk/pull/3146
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to [v2]

Prasanta Sadhukhan-2
In reply to this post by Alexey Ivanov-2
On Tue, 6 Apr 2021 20:22:36 GMT, Alexey Ivanov <[hidden email]> wrote:

>> Can this please be approved if there's no more comments?
>
>> Probably the simple "Calls paintComponent(g, c, p, r.x, r.y, r.width, r.height)" will work?
>
> …where `{@code r}` is the passed in rectangle.
>
> I'd add spaces after commas: x, y, width, height.

OK. done

-------------

PR: https://git.openjdk.java.net/jdk/pull/3146
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to [v2]

Alexey Ivanov-2
In reply to this post by Prasanta Sadhukhan-2
On Wed, 7 Apr 2021 03:21:13 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

>> Specification for method
>> javax/swing/CellRendererPane.html#paintComponent(java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle)
>> is not perfectly clear which method the call is delegated to.
>>
>> Updated spec to clarify.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
>   javadoc change

Marked as reviewed by aivanov (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/3146
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to [v2]

Sergey Bylokhov-2
In reply to this post by Prasanta Sadhukhan-2
On Wed, 7 Apr 2021 03:21:13 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

>> Specification for method
>> javax/swing/CellRendererPane.html#paintComponent(java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle)
>> is not perfectly clear which method the call is delegated to.
>>
>> Updated spec to clarify.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
>   javadoc change

Marked as reviewed by serb (Reviewer).

src/java.desktop/share/classes/javax/swing/CellRendererPane.java line 203:

> 201:
> 202:     /**
> 203:      * Calls this.paintComponent(g, c, p, r.x, r.y, r.w, r.h) where

BTW the Rectangle does not have "w" and "h" fields

-------------

PR: https://git.openjdk.java.net/jdk/pull/3146
Reply | Threaded
Open this post in threaded view
|

Re: <Swing Dev> RFR: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to [v3]

Prasanta Sadhukhan-2
In reply to this post by Prasanta Sadhukhan-2
> Specification for method
> javax/swing/CellRendererPane.html#paintComponent(java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle)
> is not perfectly clear which method the call is delegated to.
>
> Updated spec to clarify.

Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:

  javadoc change

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3146/files
  - new: https://git.openjdk.java.net/jdk/pull/3146/files/c74fbd1b..92749f76

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3146&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3146&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3146.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3146/head:pull/3146

PR: https://git.openjdk.java.net/jdk/pull/3146
Reply | Threaded
Open this post in threaded view
|

<Swing Dev> Integrated: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to

Prasanta Sadhukhan-2
In reply to this post by Prasanta Sadhukhan-2
On Tue, 23 Mar 2021 06:10:32 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

> Specification for method
> javax/swing/CellRendererPane.html#paintComponent(java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle)
> is not perfectly clear which method the call is delegated to.
>
> Updated spec to clarify.

This pull request has now been integrated.

Changeset: 016db40c
Author:    Prasanta Sadhukhan <[hidden email]>
URL:       https://git.openjdk.java.net/jdk/commit/016db40c
Stats:     2 lines in 1 file changed: 1 ins; 0 del; 1 mod

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

Reviewed-by: aivanov, serb

-------------

PR: https://git.openjdk.java.net/jdk/pull/3146