Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6325829

defect of InputMethodRequests#getTextLocation documentation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 5.0
    • client-libs

      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.

            naoto Naoto Sato
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: