*i am looking for text editor and canvas part in eclipse rcp application. can any one recommend the code for text editor and canvas using jface or swt *
i know i can use Canvas canvas=new Canvas(parent, style)
to create canvas but i need full code.
i have checked with vogella examples http://www.eclipse.org/swt/examples.php and http://www.eclipse.org/swt/snippets.php but i didn't meet the correct specifications.
SWT Snippets contains demo code for many different use cases.
In your case, you should look at " paint a circle in a canvas ".
The section "StyledText" contains snippets how to work with the SWT component of the same name. The SWT standalone examples have a simple styled text editor example .
The JFace org.eclipse.jface.text.TextViewer
class provides a basic text editor.
If you are using full Eclipse then org.eclipse.ui.editors.text.TextEditor
provides a more elaborate editor framework.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.