org.xwiki.rendering.internal.macro.chart.source
Class AxisConfigurator

java.lang.Object
  extended by org.xwiki.rendering.internal.macro.chart.source.AbstractConfigurator
      extended by org.xwiki.rendering.internal.macro.chart.source.AxisConfigurator
All Implemented Interfaces:
Configurator

public class AxisConfigurator
extends AbstractConfigurator

A configurator object for the axes. This super class provides basic parameter validation.

Since:
4.2M1

Field Summary
static String DOMAIN_AXIS_DATE_FORMAT_PARAM
          The name of the domain axis date format parameter.
static String DOMAIN_AXIS_LOWER_PARAM
          The lower limit on the domain axis.
static String DOMAIN_AXIS_PARAM
          The name of the domain axis parameter.
static String DOMAIN_AXIS_UPPER_PARAM
          The upper limit on the domain axis.
static String RANGE_AXIS_DATE_FORMAT_PARAM
          The name of the range axis date format parameter.
static String RANGE_AXIS_LOWER_PARAM
          The lower limit on the range axis.
static String RANGE_AXIS_PARAM
          The name of the range axis parameter.
static String RANGE_AXIS_UPPER_PARAM
          The upper limit on the range axis.
 
Constructor Summary
AxisConfigurator(LocaleConfiguration localeConfiguration)
           
 
Method Summary
 void setAxes(PlotType plotType, SimpleChartModel chartModel)
          Set the axes in the chart model.
 boolean setParameter(String key, String value)
          Let an implementation set a parameter.
 
Methods inherited from class org.xwiki.rendering.internal.macro.chart.source.AbstractConfigurator
invalidParameterValue, validateParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOMAIN_AXIS_PARAM

public static final String DOMAIN_AXIS_PARAM
The name of the domain axis parameter.

See Also:
Constant Field Values

RANGE_AXIS_PARAM

public static final String RANGE_AXIS_PARAM
The name of the range axis parameter.

See Also:
Constant Field Values

DOMAIN_AXIS_DATE_FORMAT_PARAM

public static final String DOMAIN_AXIS_DATE_FORMAT_PARAM
The name of the domain axis date format parameter. Used only if the axis type is date.

See Also:
Constant Field Values

RANGE_AXIS_DATE_FORMAT_PARAM

public static final String RANGE_AXIS_DATE_FORMAT_PARAM
The name of the range axis date format parameter. Used only if the axis type is date.

See Also:
Constant Field Values

DOMAIN_AXIS_LOWER_PARAM

public static final String DOMAIN_AXIS_LOWER_PARAM
The lower limit on the domain axis.

See Also:
Constant Field Values

DOMAIN_AXIS_UPPER_PARAM

public static final String DOMAIN_AXIS_UPPER_PARAM
The upper limit on the domain axis.

See Also:
Constant Field Values

RANGE_AXIS_LOWER_PARAM

public static final String RANGE_AXIS_LOWER_PARAM
The lower limit on the range axis.

See Also:
Constant Field Values

RANGE_AXIS_UPPER_PARAM

public static final String RANGE_AXIS_UPPER_PARAM
The upper limit on the range axis.

See Also:
Constant Field Values
Constructor Detail

AxisConfigurator

public AxisConfigurator(LocaleConfiguration localeConfiguration)
Parameters:
localeConfiguration - The locale configuration.
Method Detail

setParameter

public boolean setParameter(String key,
                            String value)
                     throws MacroExecutionException
Description copied from interface: Configurator
Let an implementation set a parameter.

Parameters:
key - The key of the parameter.
value - The value of the parameter.
Returns:
true if the parameter was claimed.
Throws:
MacroExecutionException - if the parameter is not supported by the data source.

setAxes

public void setAxes(PlotType plotType,
                    SimpleChartModel chartModel)
             throws MacroExecutionException
Set the axes in the chart model.

Parameters:
plotType - The target plot type.
chartModel - The target chart model.
Throws:
MacroExecutionException - if the axes are incorrectly configured.