1234567891011121314151617181920212223242526272829 |
- package com.planarChart;
- import com.planarChart.vo.QueryPlanarVo;
- public class PlanarChartFactory{
- public static PlanarChart getPlanarChartObject(String params) {
- PlanarChart planarChart = null;
- QueryPlanarVo queryVo = PlanarChart.getQueryVo(params);
- int chartType = Integer.valueOf(queryVo.getType());
- switch (chartType) {
- case PlanarChart.PIE:
- planarChart = new PiePlanarChart(queryVo);
- break;
- case PlanarChart.LINE:
- planarChart = new LinePlanarChart(queryVo);
- break;
- case PlanarChart.BAR:
- planarChart = new BarPlanarChart(queryVo);
- break;
- default:
- break;
- }
- return planarChart;
- }
- }
|