Skip to main content



      Home
Home » Eclipse Projects » GEF » Create Pie chart Figure(can i custom a figure like a pie (devided circle ))
Create Pie chart Figure [message #1010895] Mon, 18 February 2013 07:41 Go to next message
Eclipse UserFriend
Hi,

Is it possible to customize a figure in draw2d to have this shape depicted (see image)
http://s1.directupload.net/images/130218/wv5ig4ga.jpg

I need the divisions to be re-sized dynamically based on a given data. Also, I need to add an image or label to each part. Finally, it should be possible to mouse click on any color as well as symbol. Is this possible???

Thanks,
Mok

[Updated on: Mon, 18 February 2013 08:24] by Moderator

Re: Create Pie chart Figure [message #1011793 is a reply to message #1010895] Wed, 20 February 2013 04:12 Go to previous message
Eclipse UserFriend
Hi, of course it is possible.

You have to extend the Figure class and override its paintFigure() where you have to paint all that graphics based on the model state.
You have also to override its containsPoint() method to get mouse events properly work, see Ellipse figure for example.

Then just add a mouseListener to that figure and call whatever you want based on the position of the mouse pointer in the figure.
Previous Topic:enforce node position n gridlayout
Next Topic:Best practice for "invisible" figures with an EditPart?
Goto Forum:
  


Current Time: Wed Jul 23 09:41:54 EDT 2025

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

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

Back to the top