-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
5.0
-
x86
-
windows_xp
FULL PRODUCT VERSION :
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
according to API reference
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/im/InputMethodRequests.html#getTextLocation(java.awt.font.TextHitInfo)
> offset - the offset within the composed text, if there is composed text; null otherwise
However, in my experience, the parameter offset was always set 0L.
> a rectangle representing the screen location of the offset
However, javax.swing.JTextComponent.InputMethodRequestsHandler#getTextLocation
returns rectangle related to caret position (offset is ignored).
I can not understand that getTextLocation()
should return rectangle related to offset(it always set 0L)
or should return rectangle releated to caret position(against the document)
It due to defect of either the document or the implementation.
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
according to API reference
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/im/InputMethodRequests.html#getTextLocation(java.awt.font.TextHitInfo)
> offset - the offset within the composed text, if there is composed text; null otherwise
However, in my experience, the parameter offset was always set 0L.
> a rectangle representing the screen location of the offset
However, javax.swing.JTextComponent.InputMethodRequestsHandler#getTextLocation
returns rectangle related to caret position (offset is ignored).
I can not understand that getTextLocation()
should return rectangle related to offset(it always set 0L)
or should return rectangle releated to caret position(against the document)
It due to defect of either the document or the implementation.
REPRODUCIBILITY :
This bug can be reproduced always.