• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to make a text editor using GEF

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic