Skip navigation links

Package ilog.views.customizer.styling

Contains the base class of component CSS adapters, and the rule customizer logic interface.

See: Description

Package ilog.views.customizer.styling Description

Contains the base class of component CSS adapters, and the rule customizer logic interface. Usually, you allocate a subclass of 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));
}
Skip navigation links

© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.