⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 axisfactory.java

📁 cewolf是个一个自动报表程序
💻 JAVA
字号:
package de.laures.cewolf.taglib;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jfree.chart.axis.DateAxis;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.axis.ValueAxis;

/**
 * @author guido
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 * To enable and disable the creation of type comments go to
 * Window>Preferences>Java>Code Generation.
 */
public class AxisFactory implements AxisConstants {

    protected Log log = LogFactory.getLog(AxisFactory.class.getName());
    
    private static final AxisFactory instance = new AxisFactory();
    
    protected AxisFactory(){
    }
    
    public static final AxisFactory getInstance(){
    	return instance;
    }
    
	public ValueAxis createAxis(int orientation, int type, String label) {
		switch (type) {
			case AXIS_TYPE_DATE :
				return new DateAxis(label);
			case AXIS_TYPE_NUMBER :
				return new NumberAxis(label);
			default:
				throw new RuntimeException("unsupported axis type constant " + type);
		}
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -