See: Description
Interface | Description |
---|---|
IlvRuleCustomizerLogic |
This interface represents a logical customizer that can customize one
CSS rule, or a logical group of CSS rules that represent one unit.
|
Class | Description |
---|---|
IlvComponentCSSAdapter |
This class is the base class of all component CSS adapters.
|
IlvComponentCSSAdapter
,
for instance a
IlvChartCSSAdapter
.
From the adapter, you can query the rule customizer logics
(IlvRuleCustomizerLogic
) of the IlvChart
in order to use them in your application.
An example:
IlvChart chart = ... IlvChartCSSAdapter adapter = new IlvChartCSSAdapter(chart); IlvChartCSSCustomizerPanel chartCSSCustomizerPanel = new IlvChartCSSCustomizerPanel(adapter); try { // retrieve the rule customizer logic that matches the "chartArea" rule and // initialize the customizer logic with that rule IlvRuleCustomizerLogic customizerLogic = adapter.getRuleCustomizerLogic("chartArea", true); // pass this customizer logic as target to the chart CSS customizer if (customizerLogic != null) { chartCSSCustomizer.setRuleCustomizerLogic(customizerLogic); } } catch (IlvCustomizerException ex1) { ... } catch (IlvStylingException ex2) { ... }However, usually, you will work with the internally created CSS adapter of the chart CSS customizer. The code above can be shorter written by
IlvChart chart = ... IlvChartCSSCustomizerPanel chartCSSCustomizerPanel = new IlvChartCSSCustomizerPanel(chart); try { chartCSSCustomizer.setRule("chartArea"); } catch (IlvCustomizerException ex1) { ... } catch (IlvStylingException ex2) { ... }With the adapter, you can also examine the rules that currently exist in the component:
IlvChart chart = ... IlvChartCSSAdapter adapter = new IlvChartCSSAdapter(chart); // 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, 2018. All Rights Reserved.