public class IlvChartCSSAdapter extends IlvComponentCSSAdapter
IlvChartCSSAdapter
is an adapter for stylable chart
components.
It is used by the IlvChartCSSCustomizerPanel
to customize an
IlvChart
via modification of CSS (Cascading Style
Sheet rules). The chart CSS adapter allows you to retrieve the rules
that are in the chart, and to query rule customizers that exist
for those rules.
It is recommended to allocate no more than one chart CSS adapter per
chart.IlvChart
,
IlvChartCSSCustomizerPanel
Constructor and Description |
---|
IlvChartCSSAdapter(IlvChart chart)
Creates a new chart CSS adapter for a chart.
|
Modifier and Type | Method and Description |
---|---|
IlvChart |
getChart()
Returns the chart of this adapter.
|
IlvCSSRule[] |
getCustomizableRules(boolean includeDisabledRules)
Returns the customizable rules of the chart.
|
String[] |
getCustomizableRuleSelectors()
Returns the selector strings of the customizable rules of the chart.
|
IlvCSSRule[] |
getDecorationRules()
Returns the decoration rules contained in the chart.
|
String[] |
getDecorationRuleSelectors()
Returns the selector strings of the decoration rules contained in the
chart.
|
String |
getSingleObjectCustomizableRuleSelector(Object object)
Returns the customizable rule selector that corresponds to a given object.
|
boolean |
isDecorationRule(IlvCSSRule rule)
Tests whether a rule is a decoration rule.
|
void |
setChart(IlvChart chart)
Sets the chart of this adapter.
|
getInternal, getRule, getRuleCustomizerLogic, getRuleCustomizerLogic, getRuleCustomizerLogics, getRules, removeRule
public IlvChartCSSAdapter(IlvChart chart)
public IlvChart getChart()
public void setChart(IlvChart chart)
public IlvCSSRule[] getCustomizableRules(boolean includeDisabledRules)
IlvComponentCSSAdapter.getRuleCustomizerLogic(ilog.views.util.styling.IlvCSSRule)
returns not null
.includeDisabledRules
- If true
, it returns disabled customizable rules
as well.public String[] getCustomizableRuleSelectors()
IlvComponentCSSAdapter.getRuleCustomizerLogic(ilog.views.util.styling.IlvCSSRule)
returns not null
.
Additionally, this method returns the selectors of the static rules
that are implicitly always there, even if they do not occur in the
current chart.public String getSingleObjectCustomizableRuleSelector(Object object)
From all rules of the chart, usually only a subset is customizable, because other rules are auxiliary rules.
Whether a rule applies to a given object, depends on the selector of the rule, not on its declarations.
Among the customizable rules, some apply to a single particular object,
for example an IlvChart.Area
, an IlvGrid
,
an IlvScale
, an IlvLegend
, or the IlvChart
itself.
Other rules apply to several objects, for example the unconstrained
chartGrid
or chartScale
rules, or to no object
at all.
This method returns the selector string of the customizable rule that
corresponds to the given object, or null
if the object
is not of the appropriate type or does not belong to the chart of this
adapter.
public IlvCSSRule[] getDecorationRules()
IlvImageDecoration
and data indicators
IlvDataIndicator
.
In order to add a decoration to the chart, you can call
IlvChart.addDecoration(ilog.views.chart.IlvChartDecoration)
. This updates automatically the
decoration rules.public String[] getDecorationRuleSelectors()
IlvImageDecoration
and data indicators
IlvDataIndicator
.
The order of the selectors is the same order as the rules obtained
from getDecorationRules()
.
Note that very often, the decoration rule selectors are generated
strings that do not indicate what type of decoration is used.
In order to figure out the type of decoration, the corresponding
rule must be obtained from getDecorationRules()
, and the
declarations of this rule must be examined.public boolean isDecorationRule(IlvCSSRule rule)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.