/**
* Removes a subplot from the combined chart. Potentially, this removes
* some unique categories from the overall union of the datasets...so the
* domain axis is reconfigured, then a {@link PlotChangeEvent} is sent to
* all registered listeners.
*
* @param subplot the subplot (<code>null</code> not permitted).
*/
/**
* Removes a subplot from the combined chart and sends a
* {@link PlotChangeEvent} to all registered listeners.
*
* @param subplot the subplot (<code>null</code> not permitted).
*/
public void remove( [[#variable1a85b3e0]] subplot) {
if (subplot == null) {
throw new IllegalArgumentException( [[#variable1a85b3a0]]);
}
int position = -1;
int size = this.subplots.size();
int i = 0;
while (position == -1 && i < size) {
if (this.subplots.get(i) == subplot) {
position = i;
}
i++;
}
if (position != -1) {
this.subplots.remove(position);
subplot.setParent(null);
subplot.removeChangeListener(this );
this.totalWeight -= subplot.getWeight();
[[#variable1a85b340]] domain = getDomainAxis();
if (domain != null) {
domain.configure();
}
fireChangeEvent();
}
}
/**
* Returns the list of subplots. The returned list may be empty, but is
* never <code>null</code>.
*
* @return An unmodifiable list of subplots.
*/
public List getSubplots() {
if (this.subplots != null) {
return Collections.unmodifiableList(this.subplots);
}
else {
return Collections.EMPTY_LIST;
}
}
|