<AWT Dev> <Swing Dev> Webrev available for rfe 6929295 Generic support of mouse event transformation for AWT/Swing

Anthony Petrov Anthony.Petrov at Sun.COM
Thu Apr 15 03:34:35 PDT 2010


On 4/15/2010 2:20 PM Alexander Potochkin wrote:
>> src/share/classes/java/awt/Container.java
>>> 2356 * @throws IllegalComponentStateException when inverse
>>> transformation is not possible
>>
>> I believe IllegalArgumentException works best in that case since whether
>> or not it is thrown depends on the x, y arguments (and the state - the
>> transform - of course, but that's not the primary reason for the method
>> to fail).
> 
> 
> ICSE was chosen for several goods reasons,
> first of all throwing an exception
> does not really depend on x and y params
> 
> If an inverse transformation can't be done,
> it is true for every x and y
> 
> It happens when a component's bounds degrade
> to a line or to a point, e.g. scaling it down to 0,0
> 
> In this sense it is all about the component state
> 
> So I think ICSE is in a good place here

Right! Thanks for clarifying that. I'm OK with the ICSE.

--
best regards,
Anthony



More information about the awt-dev mailing list