-
Bug
-
Resolution: Fixed
-
P4
-
1.3.0
-
beta2
-
x86
-
windows_2000
-
Not verified
Name: boT120536 Date: 04/10/2001
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
I have written up the code demonstrating the problem.
Can I send the source code to someone? It is about 21kb
in a zip file and there is no upload facility on the bug
report page.
To answer these questions:
> - Exact steps to reproduce the problem.
Compile the source code. It requires JDK 1.3 and the Java
Accessibility API for JDK 1.3.
Run "TreeViewApplication.main(String[])".
Two windows should appear. A "Monkey" window and a
"Location Problem" window. The "Monkey" window is
adapted from the "Monkey" sample that is distributed with
the Accessibility API for JDK 1.3. The only difference
between this "Monkey" window and the sample "Monkey"
window is the addition of the "Move Mouse to" command.
The "Move Mouse to" command moves the mouse to the
centre of the selected component.
In the "Location Problem" window, expand all the nodes in
the "Root" tree.
Then select "Refresh Trees" from the "File" menu of the
"Monkey" window.
Then expand all nodes that are descendants of the "Location
Problem" node in the "Accessible Tree" tree of the "Monkey"
window.
Right click each of the nodes "*Root", "*A", "*Aa", ..., "*Cb2"
and select "Move mouse to".
The mouse pointer should move towards centre of the
corresponding node in the "Location Problem" window.
This does not occur for most of the nodes. In those
cases, the mouse pointer moves to a much higher
position.
> - Complete Java source code that demonstrates the problem.
The position is calculated using:
Point pTarget = acp.getLocationOnScreen();
pTarget.x += (int)rect.getWidth() / 2;
pTarget.y += (int)rect.getHeight() / 2;
Which works for most other components, but does
not work for most nodes within a JTree.
I can email you the source code (21 kb)
or the jbuilder 4 probject (94 kb)
> - The exact text of any error message(s) that appeared.
No error messages.
> - Any trace information.
No trace information.
> - Additional configuration information that you think is relevant to the
problem.
No configuration information.
Thanks
-John Ky
----- Original Message -----
From: "Bret O'Neal" <###@###.###>
To: <###@###.###>
Sent: Wednesday, April 04, 2001 5:04 AM
Subject: Please ReSubmit: (Review ID: 120007) JTreeNode's
AccessibleComponent.getLocation() returns wrong location
> Hi John Ky,
> The evaluation of your bug report has been completed.
>
> Unfortunately, we do not have enough information to create a
> new Bug. Please re-submit this bug report, after checking the
> JDC Bug Parade (http://search.java.sun.com/query.html?&col=obug
> or http://developer.java.sun.com/developer/bugParade )
> for similar bugs that have already been reported.
>
> Please include as much of the following information as possible
> when re-submitting your report
> (at http://java.sun.com/cgi-bin/bugreport.cgi):
>
> - Exact steps to reproduce the problem.
> - Complete Java source code that demonstrates the problem.
> - The exact text of any error message(s) that appeared.
> - Any trace information.
> - Additional configuration information that you think is relevant to the
problem.
>
> Thank you for taking the time to report this problem.
> Regards,
> Bret
> ----------------- Original Bug Report-------------------
>
> category : java
> subcategory : accessibility
> release : 1.3
> type : bug
> synopsis : JTreeNode's AccessibleComponent.getLocation() returns wrong
location
> description : java version "1.3.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
> Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
>
> Create a JTree like this:
>
> [-]-(*) Tree Node A
> | [ ]-(*) Tree Node A 1
> | [ ]-(*) Tree Node A 2
> | [ ]-(*) Tree Node A 3
> [-]-(*) Tree Node B
> [ ]-(*) Tree Node B 1
> [ ]-(*) Tree Node B 2
> [ ]-(*) Tree Node B 3
>
> Get the location (ie. getLocation() method) of the AccessibleComponent
> corresponding to "Tree Node B 1". It gives the location that is like the
> location of the AccessibleComponent corresponding to "Tree Node A 1"
instead.
> It may be that the calculation of the location for JTreeNodes incorrectly
fails
> to add the location of its parent tree node (in this case "Tree Node B").
> workaround :
> suggested_val :
> cust_name : John Ky
> cust_email : ###@###.###
> jdcid : Hoggy
> keyword : webbug
> company : Aurema Pty Ltd
> hardware : x86
> OSversion : windows_2000
> bugtraqID : 0
> dateCreated : 2001-04-02 17:11:53.3
> dateEvaluated : 2001-04-03 11:58:32.604
(Review ID: 120182)
======================================================================