DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page How to display other language text in SWT controls
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2009
Question How to display other language text in SWT controls - 06-08-2009, 08:00 AM

Hi,
I need to display other language texts in SWT controls using unicode.
For example in a SWT table, I need to display different language text in each row. I tried to display the a unicode text of "Tamil" language. But the text is not displayed in the table properly(displaying boxes).

I want to display the other language texts in this way in the table. Can any one please tell how to do that?

Thanks & regards,
Loganathan. S.
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2009
Default 06-10-2009, 12:31 AM

Hi,

I myself found an option, for SWT controls which are adapted by JFace viewers, we can use OwnerDrayLabel provider, and use TextLayout to draw the text, which is supporting unicode text to display as it is. For text boxes, we can use StyledText instead of Text control, because StyledText supports unicode text to display but Text does not.
Regards,
Loganathan.
Reply With Quote
  (#3 (permalink)) Old
Active Contributor
 
Posts: 62
Thanks: 0
Thanked 6 Times in 6 Posts
Join Date: Jun 2009
Default 06-11-2009, 02:22 AM

Hi, loganathans

how about to consider ASCII?


www.eclaxy.com
let's perfect the eclipse!
Reply With Quote
  (#4 (permalink)) Old
Member
 
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2009
Default 06-11-2009, 12:45 PM

Hi oxygold,
I cant understand ur question.. If u are asking about displaying ASCII charecters or text, as java supposts only unicode characters, these non-unicode characters or text should be converted manually before using it for display. This code convertion methode is well explained at: Converting Non-Unicode Text (The Java™ Tutorials > Internationalization > Working with Text)

Regards,
Loganathan. S.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Eclipse plugin for custom language editor tariq Eclipse 2 07-24-2009 05:07 AM
Would you like to develop the language plug-ins for Eclipse? yangjie Eclipse 0 05-27-2009 03:29 AM
.Raw Image display mcmmoreira Java 1 09-23-2008 08:22 AM
IObservableValue does not display actual double data type in swt Text object jaydev Eclipse 0 09-15-2008 11:15 AM
How to Embed SWT controls to an xhtml files vivekkhemka Eclipse 0 07-22-2008 04:06 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com