Skip navigation links

Package ilog.views.chart.customizer.swing

This package contains the customizer mechanism that allows you to customize the appearance of a Perforce JViews Chart component.

See: Description

Package ilog.views.chart.customizer.swing Description

This package contains the customizer mechanism that allows you to customize the appearance of a Perforce JViews Chart component. The 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));
}
Skip navigation links

© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.