|(New to GEF) Tweaking Shapes Example with Labels [message #667399]
||Thu, 28 April 2011 14:17
Registered: April 2011
I am new to GEF/draw2D. I read the Shapes Editor Example Tutorial, and used its source to build the plugin.
I now want to tweak it, to understand some other concepts.
(I've understood the Basic M-V-C model)
I want a simple label, to be shown in the Middle of each figure I draw, to start with, say a label "Rectangle" added in every drawn Rectangle, and a Label "Ellipse" added to every Ellipse drawn.
(I don't really know whether its an easy task or not, but is it possible that I get a choice to Edit those labels on the fly?)
I saw some examples on the net, explaining the Concept of Labels and EditableLabels, but I am not able to understand how it works.
With my knowledge till now, I think I'll need to make changes in the Edit Parts for the Shapes (the RectangularShape and EllipticalShape classes in the Shapes Example) as well as create some "figures" (something which is not a part of Basic tutorial).
Can anyone guide me how should I go about doing it?
(If putting up code is not possible, please try explaining the logic step wise)
Thanks in advance
Powered by FUDForum
. Page generated in 0.03589 seconds