de.laures.cewolf.taglib
Class PlotTypes

java.lang.Object
  extended by de.laures.cewolf.taglib.PlotTypes

public class PlotTypes
extends java.lang.Object

Contains the list of all possible plot type string values which can be used in the type attribute of a <chart> tag. It also contains all the renders that correspond with the plot types

Author:
Chris McCann

Field Summary
private static java.util.List typeList
          The whole typeNames array inside of a list.
static java.lang.String[] typeNames
          All type strings in an array
 
Constructor Summary
private PlotTypes()
           
 
Method Summary
static org.jfree.chart.renderer.AbstractRenderer getRenderer(int idx)
          Create a renderer for the given type index.
static int getRendererIndex(java.lang.String plotType)
          Get the renderer index for the given plot type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

typeNames

public static final java.lang.String[] typeNames
All type strings in an array


typeList

private static final java.util.List typeList
The whole typeNames array inside of a list.

See Also:
typeNames
Constructor Detail

PlotTypes

private PlotTypes()
Method Detail

getRenderer

public static org.jfree.chart.renderer.AbstractRenderer getRenderer(int idx)
Create a renderer for the given type index. We create a new renderer instance for each chart, because they may want to customize it in a post-processor.

Parameters:
idx - The index of the type
Returns:
A new renderer instance

getRendererIndex

public static int getRendererIndex(java.lang.String plotType)
                            throws AttributeValidationException
Get the renderer index for the given plot type.

Parameters:
plotType - The type string of the plot
Returns:
The index The index of renderer
Throws:
AttributeValidationException - if unknown type