You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Chunrong Lai (JIRA)" <ji...@apache.org> on 2007/09/20 10:00:31 UTC
[jira] Created: (HARMONY-4826) [classlib][awt] MouseEvent can not
fall into desired component in Insets
[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.
[jira] Resolved: (HARMONY-4826) [classlib][awt] MouseEvent can not
fall into desired component in Insets
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko resolved HARMONY-4826.
--------------------------------------
Resolution: Fixed
The patch has been applied.
Please verify.
> [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.
[jira] Assigned: (HARMONY-4826) [classlib][awt] MouseEvent can not
fall into desired component in Insets
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko reassigned HARMONY-4826:
----------------------------------------
Assignee: Alexey Petrenko
> [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.
[jira] Closed: (HARMONY-4826) [classlib][awt] MouseEvent can not
fall into desired component in Insets
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (HARMONY-4826) [classlib][awt] MouseEvent can not
fall into desired component in Insets
Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrey Pavlenko updated HARMONY-4826:
-------------------------------------
Attachment: HARMONY-4826-MouseDispatcher.patch
I agree with you that this optimization is redundant. Could you please try this patch?
> [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
> 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.
[jira] Commented: (HARMONY-4826) [classlib][awt] MouseEvent can not
fall into desired component in Insets
Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529673 ]
Andrey Pavlenko commented on HARMONY-4826:
------------------------------------------
Verified
> [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.
[jira] Commented: (HARMONY-4826) [classlib][awt] MouseEvent can not
fall into desired component in Insets
Posted by "Chunrong Lai (JIRA)" <ji...@apache.org>.
[ 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.