Skip to main content


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 19:02 Go to next message
Eclipse UserFriend
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 05:44 Go to previous message
Andreas Schosser is currently offline Andreas SchosserFriend
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: Thu Apr 25 12:54:19 GMT 2024

Powered by FUDForum. Page generated in 0.02783 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top