Windows XPSP2 Japanese
NetBeans 6.0 200709021200
IM: IME 2002
Caret is not being rendered at all during composing Japanese strings.
Some engines use a caret to represent the insert position even in the
Caret position can be retrieved by caretPositionChanged() of InputMethodListener.
getCaret() can get the info from InputMethodEvent.
Created attachment 48124 [details]
screenshot: diff between Windows native app and NetBeans editor
The complete discussion of the InputMethods support was in issue #14549.
Hi Masaki, two questions please:
1. When this happens, is the caret completely invisible or is it visible somewhere else in the text (ie at wrong position)
2. Could you please try this with M10 and check whether the caret behavior was the same?
Thanks a lot
Thank you for taking.
1. caret is completely invisible when I start to input
It seems that when composed text is existing, the caret is not displayed at all
2. the behavior is the same with M10 (also nb5.5.1)
Vita, have you changed some codes for this fix in trunk??
I noticed that 200709060000 nightly is drawing the caret!!
It almost works but it's still not perfect. There is a white
rectangle in the left side of caret and it's overlapped on
the left character.
I'll attach the screenshot.
Created attachment 48389 [details]
screenshot of 200709060000: white rectangle is overlapped in left two images during composing. right two images (without composing) are good.
There were some rendering problems in the editor, which is probably what you saw. I didn't change anything in particular
to fix this issue. Could you please try with the latest build and make sure you are not writing to the last line in the
editor (issue #114942). Actually, I made a fix for another issue in BaseCaret, which could affect the behavior while
input methods are active. Please try next nightly build and let me know. Thanks
Hi Masaki, could you please try this with the latest dev build and let me know if the issue is still there? Thanks
I tried 200709110000 build, it's not working now.
If there are 4 characters begin composed, when I move the cursor by arrow key,
|X|XXX : drawing
XX|X|X| : these positions are not working
If I remember correctly, when I tried the build 200709060000, the caret was displayed
(but with white rectangle) in these positions.
Created attachment 48579 [details]
screen capture : unzip then open .html in browser
Thanks for that, I think the white rectangle was a bug (already fixed) in text rendering unrelated to the caret. Since
this works in most cases and I have no idea what the problem could be and how to fix it I would like to ask for 6.0
waiver. Do you agree?
I am going to ask for 6.0 waiver. The problem was reported only on Windows XP, on other platforms composed text is
displayed correctly including the caret. It's definitely annoying, but not really critical, even without visible caret
it is possible to enter composed text and the text is highlighted correctly during transitions.
No problem for me. Thank you Vita for the investigation.
On 200709200000 build, caret is not displayed at all again.
On 200709110000 build, as I commented, it was visible at some position,
but on the current build, I can not see the caret in any position.
can we consider this one for 6.1 fix ?
We will see what can be done, but we still don't know what the problem is.
Really planned for 6.1?
There are useful comments and guidelines for setting up chinese/japanese locales in issue #14549. It might be useful to
read through it for understanding how to reproduce this problem.
I'll send Vita some much more updated info about locale setup
and usage than what is in 14549.
I was already able to reproduce on Windows and currently I'm making debugging builds. Currently it seems that the input
methods set blinking rate to zero and then the caret does not get painted (possibly because there is a painting code
that renders the glyphs but does not render the caret afterwards). But I need to do some more research and since I'm
testing on another machine it's progressing slowly.
I've finally found the problem. The rendering in JTextComponent.ComposedTextCaret.paint() renders white-on-white so the
installed ComposedCaret becomes invisible.
It's likely because the code in JTextComponent.ComposedTextCaret.install() sets the 'bg' variable to the component's
background color. In JDK Document impls the background color of composed text is typically reverse of the background so
this does not happen.
Since we do not currently have the character elements root implementation a better would be to just set the background
color to the component's foreground before caret's rendering gets called.