cb6a37dd45d332b80981d30663345345aa342235.svn-base 633 B

1234567891011121314151617181920212223242526272829
  1. package com.planarChart;
  2. import com.planarChart.vo.QueryPlanarVo;
  3. public class PlanarChartFactory{
  4. public static PlanarChart getPlanarChartObject(String params) {
  5. PlanarChart planarChart = null;
  6. QueryPlanarVo queryVo = PlanarChart.getQueryVo(params);
  7. int chartType = Integer.valueOf(queryVo.getType());
  8. switch (chartType) {
  9. case PlanarChart.PIE:
  10. planarChart = new PiePlanarChart(queryVo);
  11. break;
  12. case PlanarChart.LINE:
  13. planarChart = new LinePlanarChart(queryVo);
  14. break;
  15. case PlanarChart.BAR:
  16. planarChart = new BarPlanarChart(queryVo);
  17. break;
  18. default:
  19. break;
  20. }
  21. return planarChart;
  22. }
  23. }