<Swing Dev> Review request for JDK-8172489

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

<Swing Dev> Review request for JDK-8172489

Vikrant Agarwal

Hi All,

 

Please review the following:

 

Bug : https://bugs.openjdk.java.net/browse/JDK-8172489

 

Webrev Link: http://cr.openjdk.java.net/~vagarwal/8172489/webrev_01/

 

Summary: This is a fix for a bug in Jemmy, that we found while automating the SwingSet Demo.

JSlider was not able to scroll to negative value on Mac because in JSliderAPIDriver.jump(final ComponentOperator oper, final ScrollAdjuster adj)
, newValue = -1; was being done, and after assigning a new value to newValue conditionally, it was calling JSliderAPIDriver. setValue(ComponentOperator oper, int value)
which was setting the new value using JSliderOperator.setValue only if the newValue is not -1, which had been set as initial value, this was being done as a check that the value of newValue has not changed, but when the slider needs to goto a negative value, then this gets stuck at 0, because -1 value cannot be assigned.

 

Please see the bug for more description.

 

Best Regards,

Vikrant

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: <Swing Dev> Review request for JDK-8172489

alexander.kouznetsov

Looks good to me.

Phil, could you please review?

Best regards,
Alexander Kouznetsov
(408) 276-0387
On 1/12/2017 12:43 AM, Vikrant Agarwal wrote:

Hi All,

 

Please review the following:

 

Bug : https://bugs.openjdk.java.net/browse/JDK-8172489

 

Webrev Link: http://cr.openjdk.java.net/~vagarwal/8172489/webrev_01/

 

Summary: This is a fix for a bug in Jemmy, that we found while automating the SwingSet Demo.

JSlider was not able to scroll to negative value on Mac because in JSliderAPIDriver.jump(final ComponentOperator oper, final ScrollAdjuster adj)
, newValue = -1; was being done, and after assigning a new value to newValue conditionally, it was calling JSliderAPIDriver. setValue(ComponentOperator oper, int value)
which was setting the new value using JSliderOperator.setValue only if the newValue is not -1, which had been set as initial value, this was being done as a check that the value of newValue has not changed, but when the slider needs to goto a negative value, then this gets stuck at 0, because -1 value cannot be assigned.

 

Please see the bug for more description.

 

Best Regards,

Vikrant

 


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: <Swing Dev> Review request for JDK-8172489

Alexandre (Shura) Iline
In reply to this post by Vikrant Agarwal
Looks good.

Thank.

Shura

On Jan 12, 2017, at 12:43 AM, Vikrant Agarwal <[hidden email]> wrote:

Hi All,
 
Please review the following:
 
 
 
Summary: This is a fix for a bug in Jemmy, that we found while automating the SwingSet Demo.
JSlider was not able to scroll to negative value on Mac because in JSliderAPIDriver.jump(final ComponentOperator oper, final ScrollAdjuster adj) 
, newValue = -1; was being done, and after assigning a new value to newValue conditionally, it was calling JSliderAPIDriver. setValue(ComponentOperator oper, int value) 
which was setting the new value using JSliderOperator.setValue only if the newValue is not -1, which had been set as initial value, this was being done as a check that the value of newValue has not changed, but when the slider needs to goto a negative value, then this gets stuck at 0, because -1 value cannot be assigned.
 
Please see the bug for more description.
 
Best Regards,
Vikrant

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: <Swing Dev> Review request for JDK-8172489

Phil Race
In reply to this post by alexander.kouznetsov
There's a change in the logic now so that if
adj.getScrollDirection() is not INCREASE or DECREASE nothing gets changed.

I presume that is deliberate. Assuming so, "+1".

-phil.


On 1/12/17, 10:32 AM, Alexander Kouznetsov wrote:

Looks good to me.

Phil, could you please review?

Best regards,
Alexander Kouznetsov
(408) 276-0387
On 1/12/2017 12:43 AM, Vikrant Agarwal wrote:

Hi All,

 

Please review the following:

 

Bug : https://bugs.openjdk.java.net/browse/JDK-8172489

 

Webrev Link: http://cr.openjdk.java.net/~vagarwal/8172489/webrev_01/

 

Summary: This is a fix for a bug in Jemmy, that we found while automating the SwingSet Demo.

JSlider was not able to scroll to negative value on Mac because in JSliderAPIDriver.jump(final ComponentOperator oper, final ScrollAdjuster adj)
, newValue = -1; was being done, and after assigning a new value to newValue conditionally, it was calling JSliderAPIDriver. setValue(ComponentOperator oper, int value)
which was setting the new value using JSliderOperator.setValue only if the newValue is not -1, which had been set as initial value, this was being done as a check that the value of newValue has not changed, but when the slider needs to goto a negative value, then this gets stuck at 0, because -1 value cannot be assigned.

 

Please see the bug for more description.

 

Best Regards,

Vikrant

 


Loading...