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