Add and move/re-locate annotation
-
- Posts: 13
- Joined: Mon May 08, 2006 1:27 pm
Add and move/re-locate annotation
I want to add an annotation ( maybe with a pointer ) but I can imagine a user wanting to 'drag' the annotation to finely position it. Anyone tried doing this?
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Initially, I made annotations immutable because I didn't want the overhead of event listeners to notify the chart whenever an annotation changes, in order to trigger the automatic chart repainting.
You'll notice that now the classes aren't really immutable (you can modify some attributes), but there is also still no event notification. This needs tidying up. Perhaps adding event notification, and allowing annotations to be completely modifiable makes sense. It would certainly make it easier to implement more complex annotations (for instance, an entire chart could be added in one corner of a larger chart, as an annotation).
You'll notice that now the classes aren't really immutable (you can modify some attributes), but there is also still no event notification. This needs tidying up. Perhaps adding event notification, and allowing annotations to be completely modifiable makes sense. It would certainly make it easier to implement more complex annotations (for instance, an entire chart could be added in one corner of a larger chart, as an annotation).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Add and move/re-locate annotation
I have uploaded a patch to add the (still missing) event handling code for annotations (artifact id 2809117).