1 package de.laures.cewolf.taglib;
3 import org.apache.commons.logging.Log;
4 import org.apache.commons.logging.LogFactory;
5 import org.jfree.chart.axis.Axis;
6 import org.jfree.chart.axis.CategoryAxis;
7 import org.jfree.chart.axis.DateAxis;
8 import org.jfree.chart.axis.NumberAxis;
9 import org.jfree.chart.axis.ValueAxis;
14 * To change this generated comment edit the template variable "typecomment":
15 * Window>Preferences>Java>Templates.
16 * To enable and disable the creation of type comments go to
17 * Window>Preferences>Java>Code Generation.
19 public class AxisFactory implements AxisConstants {
21 protected Log log = LogFactory.getLog(AxisFactory.class.getName());
23 private static final AxisFactory instance = new AxisFactory();
25 protected AxisFactory(){
28 public static final AxisFactory getInstance(){
32 public Axis createAxis(int orientation, int type, String label) {
35 return new DateAxis(label);
36 case AXIS_TYPE_NUMBER :
37 return new NumberAxis(label);
38 case AXIS_TYPE_CATEGORY://added by lrh 2005-07-11
39 return new CategoryAxis(label);
41 throw new RuntimeException("unsupported axis type constant " + type);