See: Description
| Class | Description |
|---|---|
| IlvChartCSSCustomizerPanel |
The
IlvChartCSSCustomizerPanel is able to
customize a stylable chart component via modification of CSS (Cascading
Style Sheet rules). |
IlvChartCSSAdapter allows to examine the rules that
currently exist in the stylable chart component.
The IlvChartCSSCustomizerPanel is a Swing panel
that is able to customize a stylable Chart component.
It contains a IlvChartCSSAdapter and uses its service to
modify the CSS of the chart.
The following example allocates a chart CSS customizer to customize the parameters of the chart area, and adds this customizer to a frame.
IlvChart chart = ...
IlvChartCSSCustomizer chartCSSCustomizer = new IlvChartCSSCustomizer(chart);
frame.getContentPane().add(chartCSSCustomizer);
try {
chartCSSCustomizer.setRule("chartArea");
} catch (IlvCustomizerException ex1) {
...
} catch (IlvStylingException ex2) {
...
}
You can also examine the CSS rules that currently exist in the chart:
IlvChartCSSAdapter adapter = chartCSSCustomizer.getAdapter();
// retrieve the rules that are currently stored in the chart
IlvCSSRule[] rules = adapter.getRules(false);
// do something with these rules, for instance, print them to System.out
for (int i = 0; i < rules.length; i++) {
rules[i].printCSS(new java.io.PrintWriter(System.out, true));
}
© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.