Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make a text editor using GEF

 
gong he
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic