Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 12:41 Go to next message
Mokhtar Alshubei is currently offline Mokhtar AlshubeiFriend
Messages: 121
Registered: November 2011
Location: Germany
Senior Member
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 13:24]

Report message to a moderator

Re: Create Pie chart Figure [message #1011793 is a reply to message #1010895] Wed, 20 February 2013 09:12 Go to previous message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
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: Fri Apr 26 21:14:46 GMT 2024

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

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

Back to the top