| Create Pie chart Figure [message #1010895] |
Mon, 18 February 2013 07:41  |
Mokhtar Abdu Messages: 100 Registered: November 2011 |
Senior Member |
|
|
Hi,
Is it possible to customize a figure in draw2d to have this shape depicted (see image)

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] Report message to a moderator
|
|
|
| Re: Create Pie chart Figure [message #1011793 is a reply to message #1010895] |
Wed, 20 February 2013 04:12  |
Jan Krakora Messages: 402 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.
|
|
|
Powered by
FUDForum. Page generated in 0.05102 seconds