Package quadbase.reportdesigner.util
Interface IChartModifier
public interface IChartModifier
The interface for modifying the attributes of a chart embedded in a report. The class
(implementing this interface) is then assigned to the chart using the method setChartModifier in
ReportChartObject.
A typical use of this interface involves:
QbReport report = ...;
ReportChartObject chartObject = new ReportChartObject();
chartObject.setText(chartLocation0);
// Change the chart HERE using class created implementing IChartModifier
chartObject.setChartModifier(new ChartModifier());
...
// definition of ChartModifier somewhere else in code
// Create class to modify existing template chart. In this case,
// turn background color to pink
public class ChartModifier implements IChartModifier {
public ChartModifier() {};
public IChart modifyChart(Object chartInfo) {
ChartObject chart = new ChartObject(chartInfo); // Get actual ChartObject
chart.gethCanvas().setBackgroundColor(Color.pink);
return chart;
}
}
- See Also:
-
Method Summary
-
Method Details
-
modifyChart
Invoked when drawing chart
-