Hi Piet,

I've reviewed the AWT part of the fix only. Some comments follow.

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).


src/share/classes/java/awt/Component.java
2045                 if (peer instanceof LightweightPeer) {
2089                 if (peer instanceof LightweightPeer) {

I suggest using the isLightweight() method instead.


2081      *          or if an invocation of {...@link 
Container#toLayoutSpace(int, int)} throws
2082      *          this Exception.

My comment above regarding the ICSE applies to this note as well.


2089                 if (peer instanceof LightweightPeer) {
2090                     Container host = getNativeContainer();
2091                     if (this == host) {

How could that happen? The peer is lightweight and the component is a *native* host?

--
best regards,
Anthony

On 4/14/2010 8:13 PM Piet Blok wrote:
Hi all,

A webrev is available for rfe 6929295 Generic support of mouse event transformation for AWT/Swing.
http://www.pbjar.org/OpenJDK/6929295/webrev/

To better understand the concept, I created a document "How to use transformations in Swing"
http://www.pbjar.org/JLayer/doc/HowToUseTransform.html

Please review,

Thanks
Piet

Reply via email to