001    /*
002     * Copyright (C) 2008-2010 by Holger Arndt
003     *
004     * This file is part of the Universal Java Matrix Package (UJMP).
005     * See the NOTICE file distributed with this work for additional
006     * information regarding copyright ownership and licensing.
007     *
008     * UJMP is free software; you can redistribute it and/or modify
009     * it under the terms of the GNU Lesser General Public License as
010     * published by the Free Software Foundation; either version 2
011     * of the License, or (at your option) any later version.
012     *
013     * UJMP is distributed in the hope that it will be useful,
014     * but WITHOUT ANY WARRANTY; without even the implied warranty of
015     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
016     * GNU Lesser General Public License for more details.
017     *
018     * You should have received a copy of the GNU Lesser General Public
019     * License along with UJMP; if not, write to the
020     * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
021     * Boston, MA  02110-1301  USA
022     */
023    
024    package org.ujmp.jfreechart;
025    
026    import org.jfree.data.xy.XYSeriesCollection;
027    import org.ujmp.gui.MatrixGUIObject;
028    
029    public class XYSeriesCollectionWrapper extends XYSeriesCollection {
030            private static final long serialVersionUID = 963347559253591538L;
031    
032            private int maxSeriesCount = 10;
033    
034            private MatrixGUIObject matrix = null;
035    
036            public XYSeriesCollectionWrapper(MatrixGUIObject m) {
037                    this.matrix = m;
038    
039                    int size = (int) Math.min(m.getColumnCount(), maxSeriesCount);
040                    for (int i = 0; i < size; i++) {
041                            addSeries(new XYSeriesWrapper(matrix, i));
042                    }
043            }
044    
045            // public void setRange(Range range) {
046            // int size = Math.min(getSeriesCount(), MAXTRACES);
047            // for (int i = 0; i < size; i++) {
048            // ((XYSeriesWrapper) getSeries(i)).setRange(range);
049            // }
050            // }
051    
052            // public ValueMarker getMeanMarker(int series) {
053            // return ((XYSeriesWrapper) getSeries(series)).getMeanMarker();
054            // }
055    
056            // public IntervalMarker getStandardDeviationMarker(int series) {
057            // return ((XYSeriesWrapper) getSeries(series))
058            // .getStandardDeviationMarker();
059            // }
060    
061            // public IntervalMarker getMinMaxMarker(int series) {
062            // return ((XYSeriesWrapper) getSeries(series)).getMinMaxMarker();
063            // }
064    }