aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How  to make a text editor using GEF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How  to make a text editor using GEF" Watch "How  to make a text editor using GEF" New topic
Author

How to make a text editor using GEF

gong he
Greenhorn

Joined: Dec 08, 2004
Posts: 2
Hi,
I'm looking for a way to use GEF with a text editor,I known how to display various sytle of text in a Figure,but I didn't know how to make it editable.
please give me some suggestion.thanks!
[ December 08, 2004: Message edited by: gong he ]
gong he
Greenhorn

Joined: Dec 08, 2004
Posts: 2
is here a wrong place to ask the question?

as I know now,I can use org.eclipse.draw2d.text package to display text,just like this:
private void createComposite() {
LightweightSystem lws = new LightweightSystem(sShell);

FlowPage page=new FlowPage();
BlockFlow blockFlow=new BlockFlow();
page.add(blockFlow);

TextFlow text0=new TextFlow();
text0.setText("test string1 in color green");
text0.setForegroundColor(ColorConstants.green);

TextFlow text1=new TextFlow();
text1.setText("test string1 in color blue");
text1.setForegroundColor(ColorConstants.blue);

blockFlow.add(text0);
blockFlow.add(text1);

lws.setContents(page);

}


but how can make them editable? to define tool and EditPart?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to make a text editor using GEF
 
Similar Threads
GEF (Graphical Editing Framework)
Working with GEF
GEF framework
Question of Visual Editor in Eclipse
GEF Examples