[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: what is TextContent?

It looks like this class is just part of the developerworks example, it says
"This class, included in the sample code, has support...".  I see a download
at the bottom of the page, so it's probably in there.

Grant


"Subin Modeel" <subin.mdl@xxxxxxxxx> wrote in message
news:9b91c01795e7478f83356441fdfb428e$1@xxxxxxxxxxxxxxxxxx
> ************************************************************************
> protected static final String dummyContent =
> "Just plain text!\n" +
> "Now is the time for <b>all</b> good men " +
> "to come to the aid of their country\n" +
> "<red><i>To <b>be</b></i> or <i>not to <b>be</b></i>?</red> " +
> "<blue><u>That</u> is the <so>question</so></blue>\n" +
> "That's all folks!\n";
>
>
> TextContent tc = new TextContent(body.getDisplay());
> tc.setContent(dummyContent);
> styledText.setText(tc.toPlainText());
> styledText.setStyleRanges(tc.getStyleRanges());
>
> *************************************************************************
> I found the above code at
> http://www.ibm.com/developerworks/opensource/library/os-jface3/
>
> could anyone please tell me what Textcontent is...and how to use it.
> i couldnt find any tutorials on it.
> i dont even know which package it comes under.
>