Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / July 2004

Tip: Looking for answers? Try searching our database.

SWT/JFace StyledText box vs URLs

Thread view: 
Michael Brown - 21 Jul 2004 04:19 GMT
Is there a SWT/JFace equivalent (maybe via StyledText) to the RichText
control in .NET? Specifically, I'm looking for an easy way to display text
in a box and have the box automatically detect and highlight URLs, then
raise an event if the user clicks on the URL.

Do I need to cobble up a custom content manager for my StyledText box?
Any other ideas?

Thanks...

Mike
Andrew Thompson - 21 Jul 2004 04:44 GMT
> an easy way to display text
> in a box and have the box automatically detect and highlight URLs, then
> raise an event if the user clicks on the URL.

Format it as HTML and drop it in a JEditorPAne
with an HyperlinkListener attached.

Signature

Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology

Michael Brown - 21 Jul 2004 23:52 GMT
> > an easy way to display text
> > in a box and have the box automatically detect and highlight URLs, then
> > raise an event if the user clicks on the URL.
>
> Format it as HTML and drop it in a JEditorPAne
> with an HyperlinkListener attached.

Thanks, but how does this play with SWT/JFace?  Isn't JEditorPane a Swing
thing?  I haven't seen this in my SWT 2.1 docs. I'm working with a SWT app
and want to stick with SWT for cross-platform native look-and-feel.

Mike
Andrew Thompson - 22 Jul 2004 01:28 GMT
(JEdtiorPane)
> Thanks, but how does this play with SWT/JFace?

Doesn't, merely an 'existing alternative'.

Signature

Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology

Michael Brown - 23 Jul 2004 02:03 GMT
OK, thanks again.

I've discovered I can embed Swing things into SWT widgets, so there might be
some hope of doing this.  But alas, the docs don't indicate this works for
all platforms I need to support.  Oh well...

Mike

> (JEdtiorPane)
> > Thanks, but how does this play with SWT/JFace?
>
> Doesn't, merely an 'existing alternative'.
Dick Wad - 23 Jul 2004 12:38 GMT
Why not use the SWT Browser widget?

Dick


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.