harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chunrong Lai (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4826) [classlib][awt] MouseEvent can not fall into desired component in Insets
Date Thu, 20 Sep 2007 08:00:38 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529017
] 

Chunrong Lai commented on HARMONY-4826:
---------------------------------------


 If we think it is a bug, it is trival to fix it that we just need to remove the "if" condition
above.

> [classlib][awt] MouseEvent can not fall into desired component in Insets
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-4826
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4826
>             Project: Harmony
>          Issue Type: Test
>          Components: Classlib
>         Environment: Win32 + Linux32
>            Reporter: Chunrong Lai
>            Priority: Minor
>
>  I am not sure if it is a bug or not.
>  In some applications I did observe that some containers (with customized LayoutManager)
layout child-components in the Insets-Area! One example is the floating toolbar. Programmers
may layout the fixed titlebar in (customized) Insets-Area but layout the variable buttons
in normal area.
>  The problem is that, the mouse event is just filtered at Insets-Area in Harmony (to
optimize it, I believe) so above titleBar does not respond to Mouse at all. See below funtion
in awt/src/main/java/common/java/awt/MouseDispatcher.java
>     private void fall2Child(PointerInfo info) {
>         Insets insets = info.src.getInsets();
>         final Point pos = info.position;
>         final int x = pos.x;
>         final int y = pos.y;
>         if ((x >= insets.left) && (y >= insets.top) &&
>                 (x < (info.src.w - insets.right)) &&
>                 (y < (info.src.h - insets.bottom)))   // Is this optimization necessary?
>         {
>             Component[] children = ((Container) info.src).getComponents();
>             for (Component child : children) {
>             .....
>  It is also seen that RI works for such special components.
>  Discussion is welcome.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message