001 package jp.osdl.jbento2.chart; 002 003 import org.jfree.data.category.DefaultCategoryDataset; 004 import org.jfree.data.general.AbstractDataset; 005 006 public class CategoryDataSetBuilder extends DataSetBuilderBase { 007 008 protected AbstractDataset newDataset() { 009 return new DefaultCategoryDataset(); 010 } 011 012 protected void add(AbstractDataset dataset, String row, String column, 013 String value) { 014 try { 015 ((DefaultCategoryDataset) dataset).addValue( 016 Double.parseDouble(value), row, column); 017 } catch (NumberFormatException e) { 018 System.err.println("row=\"" + row + "\", value=\"" + value 019 + "\" : " + e.getMessage()); 020 } 021 } 022 023 }