use of org.jfree.chart.event.PlotChangeEvent in project processdash by dtuma.
the class DiscPlot method setLabelFont.
/**
* @param labelFont The labelFont to set.
*/
public void setLabelFont(Font labelFont) {
this.labelFont = labelFont;
notifyListeners(new PlotChangeEvent(this));
}
use of org.jfree.chart.event.PlotChangeEvent in project processdash by dtuma.
the class DiscPlot method setInteriorGap.
/**
* Sets the interior gap and sends a {@link PlotChangeEvent} to all
* registered listeners. This controls the space between the edges of the
* pie plot and the plot area itself (the region where the section labels
* appear).
*
* @param percent the gap (as a percentage of the available drawing space).
*
* @see #getInteriorGap()
*/
public void setInteriorGap(double percent) {
if ((percent < 0.0) || (percent > MAX_INTERIOR_GAP)) {
throw new IllegalArgumentException("Invalid 'percent' (" + percent + ") argument.");
}
if (this.interiorGap != percent) {
this.interiorGap = percent;
notifyListeners(new PlotChangeEvent(this));
}
}
use of org.jfree.chart.event.PlotChangeEvent in project processdash by dtuma.
the class DiscPlot method setLabelPaint.
/**
* @param labelPaint The labelPaint to set.
*/
public void setLabelPaint(Paint labelPaint) {
this.labelPaint = labelPaint;
notifyListeners(new PlotChangeEvent(this));
}
use of org.jfree.chart.event.PlotChangeEvent in project SIMVA-SoS by SESoS.
the class CategoryPlot method rendererChanged.
/**
* Receives notification of a renderer change event.
*
* @param event the event.
*/
@Override
public void rendererChanged(RendererChangeEvent event) {
Plot parent = getParent();
if (parent != null) {
if (parent instanceof RendererChangeListener) {
RendererChangeListener rcl = (RendererChangeListener) parent;
rcl.rendererChanged(event);
} else {
// an exception in case future changes make it possible...
throw new RuntimeException("The renderer has changed and I don't know what to do!");
}
} else {
configureRangeAxes();
PlotChangeEvent e = new PlotChangeEvent(this);
notifyListeners(e);
}
}
use of org.jfree.chart.event.PlotChangeEvent in project SIMVA-SoS by SESoS.
the class CategoryPlot method datasetChanged.
/**
* Receives notification of a change to the plot's dataset.
* <P>
* The range axis bounds will be recalculated if necessary.
*
* @param event information about the event (not used here).
*/
@Override
public void datasetChanged(DatasetChangeEvent event) {
for (ValueAxis yAxis : this.rangeAxes.values()) {
if (yAxis != null) {
yAxis.configure();
}
}
if (getParent() != null) {
getParent().datasetChanged(event);
} else {
PlotChangeEvent e = new PlotChangeEvent(this);
e.setType(ChartChangeEventType.DATASET_UPDATED);
notifyListeners(e);
}
}
Aggregations