/**
* Adds an annotation to the plot and, if requested, sends a
* {@link PlotChangeEvent} to all registered listeners.
*
* @param annotation the annotation (<code>null</code> not permitted).
* @param notify notify listeners?
*
* @since 1.0.10
*/
public void addAnnotation( [[#variable1a9730c0]] annotation, boolean notify) {
if (annotation == null) {
throw new IllegalArgumentException("Null \'annotation\' argument.");
}
this.annotations.add(annotation);
if (notify) {
fireChangeEvent();
}
}
/**
* Removes an annotation from the plot and sends a {@link PlotChangeEvent}
* to all registered listeners.
*
* @param annotation the annotation (<code>null</code> not permitted).
*
* @return A boolean (indicates whether or not the annotation was removed).
*
* @see #addAnnotation(CategoryAnnotation)
*/
/**
* Removes an annotation from the plot and sends a {@link PlotChangeEvent}
* to all registered listeners.
*
* @param annotation the annotation (<code>null</code> not permitted).
*
* @return A boolean (indicates whether or not the annotation was removed).
*
* @see #addAnnotation(XYAnnotation)
* @see #getAnnotations()
*/
public boolean removeAnnotation( [[#variable1a9730c0]] annotation) {
return removeAnnotation(annotation, true);
}
/**
* Removes an annotation from the plot and, if requested, sends a
* {@link PlotChangeEvent} to all registered listeners.
*
* @param annotation the annotation (<code>null</code> not permitted).
* @param notify notify listeners?
*
* @return A boolean (indicates whether or not the annotation was removed).
*
* @since 1.0.10
*/
/**
* Removes an annotation from the plot and sends a {@link PlotChangeEvent}
* to all registered listeners.
*
* @param annotation the annotation (<code>null</code> not permitted).
* @param notify notify listeners?
*
* @return A boolean (indicates whether or not the annotation was removed).
*
* @since 1.0.10
*/
public boolean removeAnnotation( [[#variable1a9730c0]] annotation, boolean notify) {
if (annotation == null) {
throw new IllegalArgumentException("Null \'annotation\' argument.");
}
boolean removed = this.annotations.remove(annotation);
if (removed && notify) {
fireChangeEvent();
}
return removed;
}
|