Any java ui gurus out there?
#1
Scooby Regular
Thread Starter
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes
on
0 Posts
Any java ui gurus out there?
If so, any ideas on this...
Got a servlet which is trying to load in some source code from a text file, (cobol / java / jcl / asm etc), colorize it according to the rules of that language, (i.e. so it looks like it would in an editor for that language), then output it as an html document. Also inserts hyperlinks on certain keywords and highlights certain areas of text with different coloured backgrounds etc.
At the moment I've got this working by reading the text character by character, and inserting style tags as and when needed. It works, but is a bit slow and clunky, and I can't help feeling that there should be a more elegant way of doing it.
I did wonder about using the swing text / document stuff, and writing a routine to convert the document to html after it had been styled, but not sure if this will work (how do I insert hyperlinks etc around items for example).
Any ideas gratefully received, as google isn't returning much info on the subject....
Thanks,
Iain
Got a servlet which is trying to load in some source code from a text file, (cobol / java / jcl / asm etc), colorize it according to the rules of that language, (i.e. so it looks like it would in an editor for that language), then output it as an html document. Also inserts hyperlinks on certain keywords and highlights certain areas of text with different coloured backgrounds etc.
At the moment I've got this working by reading the text character by character, and inserting style tags as and when needed. It works, but is a bit slow and clunky, and I can't help feeling that there should be a more elegant way of doing it.
I did wonder about using the swing text / document stuff, and writing a routine to convert the document to html after it had been styled, but not sure if this will work (how do I insert hyperlinks etc around items for example).
Any ideas gratefully received, as google isn't returning much info on the subject....
Thanks,
Iain
Thread
Thread Starter
Forum
Replies
Last Post
ozzy
Computer & Technology Related
12
28 July 2002 07:09 PM