From: SourceForge.net <no...@so...> - 2008-03-25 20:16:18
|
Patches item #1913751, was opened at 2008-03-13 18:32 Message generated for change (Comment added) made by mungady You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=315494&aid=1913751&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Resolution: Accepted Priority: 7 Private: No Submitted By: Richard West (richardwest) Assigned to: David Gilbert (mungady) Summary: XYPlot addAnnotation version with notify boolean Initial Comment: current implementation: /** * Adds an annotation to the plot and sends a {@link PlotChangeEvent} to * all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * * @see #getAnnotations() * @see #removeAnnotation(XYAnnotation) */ public void addAnnotation(XYAnnotation annotation) { if (annotation == null) { throw new IllegalArgumentException("Null 'annotation' argument."); } this.annotations.add(annotation); notifyListeners(new PlotChangeEvent(this)); } new implementation: /** * Adds an annotation to the plot and sends a {@link PlotChangeEvent} to * all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * * @see #getAnnotations() * @see #removeAnnotation(XYAnnotation) */ public void addAnnotation(XYAnnotation annotation) { addAnnotation(annotation, true); } /** * Adds an annotation to the plot and optionally sends a {@link PlotChangeEvent} to * all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * @param notify optionally notify all listeners * * @see #getAnnotations() * @see #removeAnnotation(XYAnnotation) */ public void addAnnotation(XYAnnotation annotation, boolean notify) { if (annotation == null) { throw new IllegalArgumentException("Null 'annotation' argument."); } this.annotations.add(annotation); if (notify) { notifyListeners(new PlotChangeEvent(this)); } } ---------------------------------------------------------------------- >Comment By: David Gilbert (mungady) Date: 2008-03-25 20:16 Message: Logged In: YES user_id=112975 Originator: NO We have already in CategoryPlot: public void setDomainAxis(int index, CategoryAxis axis, boolean notify); public void setRangeAxis(int index, ValueAxis axis, boolean notify); ...and in XYPlot: public void setDomainAxis(int index, ValueAxis axis, boolean notify); public void setRangeAxis(int index, ValueAxis axis, boolean notify); We could add versions without the index argument, but I figure that if the caller understands enough about what they're doing to suppress the notifications, then they'll probably be OK with specifying the axis index too. But feel free to argue the case... Regards, Dave ---------------------------------------------------------------------- Comment By: Richard West (richardwest) Date: 2008-03-25 16:30 Message: Logged In: YES user_id=1788593 Originator: YES Is there no desire/need to do the set*Axis methods as well? ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2008-03-25 13:52 Message: Logged In: YES user_id=112975 Originator: NO CategoryPlot is done now too, for inclusion in the upcoming 1.0.10 release. Thanks again! Regards, Dave ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2008-03-25 12:59 Message: Logged In: YES user_id=112975 Originator: NO Thanks for the suggestions. I'm committing the changes for XYPlot now...CategoryPlot still to do. Regards, Dave ---------------------------------------------------------------------- Comment By: Richard West (richardwest) Date: 2008-03-19 23:56 Message: Logged In: YES user_id=1788593 Originator: YES Sorry to keep adding to this list, but another candidates for the extra notify argument would be setDomainAxis(ValueAxis)/setDomainAxis(CategoryAxis) and setRangeAxis(ValueAxis). ---------------------------------------------------------------------- Comment By: Richard West (richardwest) Date: 2008-03-14 16:43 Message: Logged In: YES user_id=1788593 Originator: YES This can also be done for addDomainMarker, addRangeMarker, removeDomainMarker, and removeRangeMarker for both XYPlot and CategoryPlot. ---------------------------------------------------------------------- Comment By: Richard West (richardwest) Date: 2008-03-13 18:38 Message: Logged In: YES user_id=1788593 Originator: YES This can also be done for the CategoryPlot. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=315494&aid=1913751&group_id=15494 |