You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Petrenko (JIRA)" <ji...@apache.org> on 2007/09/25 12:20:50 UTC
[jira] Closed: (HARMONY-4826) [classlib][awt] MouseEvent can not
fall into desired component in Insets
[ https://issues.apache.org/jira/browse/HARMONY-4826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko closed HARMONY-4826.
------------------------------------
> [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
> Assignee: Alexey Petrenko
> Priority: Minor
> Attachments: HARMONY-4826-MouseDispatcher.patch
>
>
> 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.