Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » about shape Example
about shape Example [message #238245] Sat, 01 September 2007 15:02 Go to next message
Eclipse User
Originally posted by: babybear315.163.com

gents:
I want to modify the gef example shapes for my study.I want to add text in
ellipse,How to do this,I try to add code in createFigure(),but I failed.
Re: about shape Example [message #238250 is a reply to message #238245] Mon, 03 September 2007 01:44 Go to previous message
Andreas Schosser is currently offline Andreas Schosser
Messages: 30
Registered: July 2009
Member
Hi Babybear,

GEF realizes the MVC (Model-View-Controller) concept. The Figures(View)
are being created and updated by the corresponding EditParts
(Controller) which usually listen to changes of the model elements.

Please take a look at the GEF developer's guide:
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. gef.doc.isv/guide/guide.html

If you want to implement editable labels for the shapes, the steps you
will have to undertake will probably look like this:
1.) Realize the model element (e.g. extend EllipticalShape)
2.) Implement the figure (e.g. extend the createFigure() /
createFigureForModel() method)
3.) Update the edit-part [e.g. extend refreshVisuals(), listen to
additional model (property) changes, react to direct-edit requests by
overriding performRequest(Request)-method, implement direct-edit
command, etc.]

Did you read the shapes tutorial?
http://www.eclipse.org/articles/Article-GEF-diagram-editor/s hape.html

Good luck! :)

Kind regards,

Andreas


babybear315 schrieb:
> gents:
> I want to modify the gef example shapes for my study.I want to add text in
> ellipse,How to do this,I try to add code in createFigure(),but I failed.
>
>
Previous Topic:gef with editor
Next Topic:notation:ShapeStyle
Goto Forum:
  


Current Time: Tue Sep 02 13:11:25 EDT 2014

Powered by FUDForum. Page generated in 0.03652 seconds