org.openi.chart
Class LabelGenerator

java.lang.Object
  extended by org.openi.chart.LabelGenerator
All Implemented Interfaces:
org.jfree.chart.labels.CategoryItemLabelGenerator

public class LabelGenerator
extends java.lang.Object
implements org.jfree.chart.labels.CategoryItemLabelGenerator

Author:
plucas TODO need to impement new methods of CategoryItemLabelGenerator(JFreeChart 1.0.0)

Constructor Summary
LabelGenerator(int category)
          Creates a new label generator that displays the item value and a percentage relative to the value in the same series for the specified category.
LabelGenerator(java.lang.Integer category)
          Creates a new label generator that displays the item value and a percentage relative to the value in the same series for the specified category.
 
Method Summary
 java.lang.String generateColumnLabel(org.jfree.data.category.CategoryDataset arg0, int arg1)
           
 java.lang.String generateLabel(org.jfree.data.category.CategoryDataset dataset, int series, int category)
          Generates a label for the specified item.
 java.lang.String generateRowLabel(org.jfree.data.category.CategoryDataset arg0, int arg1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelGenerator

public LabelGenerator(int category)
Creates a new label generator that displays the item value and a percentage relative to the value in the same series for the specified category.

Parameters:
category - the category index (zero-based).

LabelGenerator

public LabelGenerator(java.lang.Integer category)
Creates a new label generator that displays the item value and a percentage relative to the value in the same series for the specified category. If the category index is null, the total of all items in the series is used.

Parameters:
category - the category index (null permitted).
Method Detail

generateLabel

public java.lang.String generateLabel(org.jfree.data.category.CategoryDataset dataset,
                                      int series,
                                      int category)
Generates a label for the specified item. The label is typically a formatted version of the data value, but any text can be used.

Specified by:
generateLabel in interface org.jfree.chart.labels.CategoryItemLabelGenerator
Parameters:
dataset - the dataset (null not permitted).
series - the series index (zero-based).
category - the category index (zero-based).
Returns:
the label (possibly null).

generateColumnLabel

public java.lang.String generateColumnLabel(org.jfree.data.category.CategoryDataset arg0,
                                            int arg1)
Specified by:
generateColumnLabel in interface org.jfree.chart.labels.CategoryItemLabelGenerator

generateRowLabel

public java.lang.String generateRowLabel(org.jfree.data.category.CategoryDataset arg0,
                                         int arg1)
Specified by:
generateRowLabel in interface org.jfree.chart.labels.CategoryItemLabelGenerator