[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] what is TextContent?
|
- From: subin.mdl@xxxxxxxxx (Subin Modeel)
- Date: Wed, 26 Mar 2008 14:59:33 +0000 (UTC)
- Newsgroups: eclipse.platform.swt
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
************************************************************************
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.