vijaya kumar
vijaya kumar

Reputation: 834

swt or jface code to create a text editor and canvas

*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.

Upvotes: 0

Views: 1087

Answers (2)

Aaron Digulla
Aaron Digulla

Reputation: 328594

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.

Upvotes: 1

greg-449
greg-449

Reputation: 111142

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.

Upvotes: 0

Related Questions