JDK-5065189 : REGRESSION: Cannot input Hindi & Thai in any Text Editing components
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS:
    generic,linux,solaris_9,windows_nt,windows_2000,windows_xp generic,linux,solaris_9,windows_nt,windows_2000,windows_xp
  • CPU: generic,x86,sparc
  • Submitted: 2004-06-18
  • Updated: 2017-05-16
  • Resolved: 2004-07-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b58Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Description
Test set up:
jdk build: b56
GS version:GS06

Steps to reproduce:
1)Login to any platform(solaris/windows) in hindi / Thai locale
2)Use GS and execute any of the text editing components for example:
sh run_gs.sh -jdk:<jdk1.5.0-home-path> ../../src/GS/LigatureTest/JTextAreaLTest1.java
3)Try inputting the hindi/thai characters(as per the locale in which you have logged in)
4)Observation: As the characters are typed the entire text dissapears. Just the cursor movement can be seen.
This happens even with the input dialog that is available when executing JDialog.

Other related testing:
1) Login with hindi /thai locale on any platform 
2) Execute the Notepad/Stylepad demo applications that are been provided under the jdk1.5.0/demo/jfc/ directory , using the command for example: java -jar Notepad.jar
3)Input the hindi / thai characters
4)Observation:
 -After typing few characters, press Enter. As you type in characters the glyphs are not seen on the text component. Only after pressing 'Enter' the entire line that you typed becomes visible
-Even when just pressing Enter key the following exception was thrown

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Zero length iterator passed to TextLayout constructor. at 
java.awt.font.TextLayout.(TextLayout.java:594) at com.sun.java.swing.SwingUtilities2.drawString(SwingUtilities2.java:544) at 
javax.swing.text.Utilities.paintComposedText(Utilities.java:745) at javax.swing.text.GlyphView.paint(GlyphView.java:386) at 
javax.swing.text.BoxView.paintChild(BoxView.java:144) at javax.swing.text.BoxView.paint(BoxView.java:407) at 
javax.swing.text.BoxView.paintChild(BoxView.java:144) at javax.swing.text.BoxView.paint(BoxView.java:407) at 
javax.swing.text.ParagraphView.paint(ParagraphView.java:582) at javax.swing.text.BoxView.paintChild(BoxView.java:144) at 
javax.swing.text.BoxView.paint(BoxView.java:407) at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1351) at 
javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:642) at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:791) at 
javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:759) at javax.swing.JComponent.paintComponent(JComponent.java:740) at 
javax.swing.JComponent.paint(JComponent.java:1003) at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4930) at 
javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4883) at 
javax.swing.JComponent._paintImmediately(JComponent.java:4826) at javax.swing.JComponent.paintImmediately(JComponent.java:4633) at 
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451) at 
javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114) at 
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at 
java.awt.EventDispatchThread.run(EventDispatchThread.java:110) m




Older builds: Not found in b55. Hence Regression



###@###.### 2004-06-17
###@###.### 2004-07-20

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-rc FIXED IN: tiger-rc INTEGRATED IN: tiger-b58 tiger-rc VERIFIED IN: tiger-rc
17-09-2004

EVALUATION it is a regression introduced by the fix for 5045914 [TEST_BUG & 1.5 REGRESSION: Test javax/swing/JScrollPane/4237560/bug4237560.java] ###@###.### 2004-06-18 ============================================ from the bug report for 5045914 >The idea of the fix is to make LogicalView the only child >of FlowView when its being constructed. It will be removed >while laying out FlowView later. Unfortunately it is removed with all its children. That completely breaks FlowLayout. To fix this bug I suggest to refix 5045914. Two things to consider. 1. LayoutPool should not be appended to FlowLayout 2. LayoutPool.setParent(null) is to be called when FlowLayout.setParent(null) --- FlowView.java Mon Jun 21 13:58:27 2004 *************** *** 119,125 **** if (layoutPool == null) { layoutPool = new LogicalView(getElement()); } - append(layoutPool); layoutPool.setParent(this); // This synthetic insertUpdate call gives the strategy a chance --- 119,124 ---- *************** *** 268,273 **** --- 267,280 ---- strategy.changedUpdate(this, changes, getInsideAllocation(a)); } + /** {@inheritDoc} */ + public void setParent(View parent) { + super.setParent(parent); + if (parent == null) { + layoutPool.setParent(null); + } + } + // --- variables ----------------------------------------------- /** ###@###.### 2004-06-21
21-06-2004